mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
Fix empty assign_title validation
This commit is contained in:
parent
6d5f4e92cc
commit
1ac298f6ff
1 changed files with 3 additions and 3 deletions
|
|
@ -1385,9 +1385,9 @@ class WorkflowActionSerializer(serializers.ModelSerializer):
|
|||
]
|
||||
|
||||
def validate(self, attrs):
|
||||
# Empty strings treated as None to avoid unexpected behavior
|
||||
if "assign_title" in attrs:
|
||||
if attrs["assign_title"] is not None and len(attrs["assign_title"]) == 0:
|
||||
if "assign_title" in attrs and attrs["assign_title"] is not None:
|
||||
if len(attrs["assign_title"]) == 0:
|
||||
# Empty strings treated as None to avoid unexpected behavior
|
||||
attrs["assign_title"] = None
|
||||
else:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue