Skip to content

Commit a870ef2

Browse files
Vaghinak BasentsyanVaghinak Basentsyan
authored andcommitted
Fixed blank name column handeling
1 parent 5cfb1d6 commit a870ef2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

superannotate/db/projects.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,9 +2011,7 @@ def attach_file_urls_to_project(project, attachments, annotation_status):
20112011
df = df[~df["url"].isnull()]
20122012

20132013
if "name" in df.columns:
2014-
df.loc[df["name"].isnull(), "name"] = [
2015-
str(uuid.uuid4()) for _ in range(df["name"].isnull().sum())
2016-
]
2014+
df["name"] = df["name"].fillna("").apply(lambda cell: cell if str(cell).strip() else str(uuid.uuid4()))
20172015
else:
20182016
df["name"] = [str(uuid.uuid4()) for _ in range(len(df.index))]
20192017

0 commit comments

Comments
 (0)