mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
Update serialisers.py
This commit is contained in:
parent
79bf125e78
commit
233212d198
@ -533,7 +533,10 @@ class CustomFieldSerializer(serializers.ModelSerializer):
|
|||||||
if (
|
if (
|
||||||
"data_type" in attrs
|
"data_type" in attrs
|
||||||
and attrs["data_type"] == CustomField.FieldDataType.SELECT
|
and attrs["data_type"] == CustomField.FieldDataType.SELECT
|
||||||
) or self.instance.data_type == CustomField.FieldDataType.SELECT:
|
) or (
|
||||||
|
self.instance
|
||||||
|
and self.instance.data_type == CustomField.FieldDataType.SELECT
|
||||||
|
):
|
||||||
if (
|
if (
|
||||||
"extra_data" not in attrs
|
"extra_data" not in attrs
|
||||||
or "select_options" not in attrs["extra_data"]
|
or "select_options" not in attrs["extra_data"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user