Skip to content

Commit

Permalink
fix nulls in description
Browse files Browse the repository at this point in the history
  • Loading branch information
AstridKery committed Sep 19, 2024
1 parent 0ff95a1 commit d08d7be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/django/core/views/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,16 @@ def done(self, form_list, form_dict, **kwargs):

label_data = labels.cleaned_data["label_data_file"]
label_data["Label"] = label_data["Label"].astype(str)
label_data["Description"] = label_data["Description"].astype(str).fillna("")
label_data["project"] = proj_obj.pk

stream = StringIO()
label_data[["Label", "Description", "project"]].to_csv(
label_data[["Label", "project", "Description"]].to_csv(
stream,
sep="\t",
header=False,
index=False,
columns=["Label", "Description", "project"],
columns=["Label", "project", "Description"],
escapechar="\\",
doublequote=False,
)
Expand All @@ -365,8 +366,8 @@ def done(self, form_list, form_dict, **kwargs):
null="",
columns=[
"name",
"description",
"project_id",
"description",
],
)

Expand Down

0 comments on commit d08d7be

Please sign in to comment.