Skip to content

Commit

Permalink
fix: csv export
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Mar 29, 2024
1 parent a2a5d3f commit 68b39af
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions uniticket/uni_ticket/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,11 @@ def disabled_expired_items(items):

def export_input_module_csv(
module,
delimiter="$",
quotechar='"',
dialect="excel",
ticket_codes_list=[],
file_name="export.csv",
delimiter =',',
quotechar ='"',
quoting=csv.QUOTE_ALL
):

module.ticket_category
Expand Down Expand Up @@ -566,7 +566,10 @@ def export_input_module_csv(
csv_file["Content-Disposition"] = 'attachment; filename="{}"'.format(
file_name)
writer = csv.writer(
csv_file, dialect=dialect, delimiter=delimiter, quotechar=quotechar
csv_file,
delimiter=delimiter,
quotechar=quotechar,
quoting=quoting
)

writer.writerow(head)
Expand Down

0 comments on commit 68b39af

Please sign in to comment.