From a8de26f88acc5a986693f0cf90635b65587f9bb3 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 23 Mar 2025 17:25:15 -0700 Subject: [PATCH] Fix: only overwrite existing cf values in workflow if set (#9459) --- src/documents/signals/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index 407735375..21ea76836 100644 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -784,10 +784,10 @@ def run_workflows( field=field, document=document, ).first() - if instance: + if instance and args[value_field_name] is not None: setattr(instance, value_field_name, args[value_field_name]) instance.save() - else: + elif not instance: CustomFieldInstance.objects.create( **args, field=field,