Skip to content

Commit 97138e2

Browse files
authored
Merge pull request #131 from superannotateai/SAS-4011
Fixed blank name column handeling
2 parents 5cfb1d6 + 5f23a87 commit 97138e2

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 uuid.uuid4())
20172015
else:
20182016
df["name"] = [str(uuid.uuid4()) for _ in range(len(df.index))]
20192017

0 commit comments

Comments
 (0)