Fix connecting a dictionary to task sometimes raises an exception

This commit is contained in:
allegroai 2023-01-23 14:08:18 +02:00
parent 1a62d4b6e1
commit 55b00eb776

View File

@ -1228,9 +1228,8 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
def create_description():
if org_param and org_param.description:
return org_param.description
created_description = ""
if org_k in descriptions:
created_description = descriptions[org_k]
# don't use get(org_k, "") here in case org_k in descriptions and the value is None
created_description = descriptions.get(org_k) or ""
if isinstance(v, Enum):
# append enum values to description
if created_description: