Fix: only overwrite existing cf values in workflow if set

This commit is contained in:
shamoon 2025-03-22 15:11:35 -07:00
parent b4047e73bb
commit f8fe0c079e
No known key found for this signature in database

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,