Fix: only overwrite existing cf values in workflow if set (#9459)

This commit is contained in:
shamoon 2025-03-23 17:25:15 -07:00 committed by GitHub
parent f753f6dc46
commit a8de26f88a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -784,10 +784,10 @@ def run_workflows(
field=field, field=field,
document=document, document=document,
).first() ).first()
if instance: if instance and args[value_field_name] is not None:
setattr(instance, value_field_name, args[value_field_name]) setattr(instance, value_field_name, args[value_field_name])
instance.save() instance.save()
else: elif not instance:
CustomFieldInstance.objects.create( CustomFieldInstance.objects.create(
**args, **args,
field=field, field=field,