Merge pull request #1412 from paperless-ngx/fix/created-date-not-required

Fix: `created_date` should not be required
This commit is contained in:
shamoon 2022-08-14 16:06:48 -07:00 committed by GitHub
commit 87953cb98a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,7 +240,8 @@ class DocumentSerializer(DynamicFieldsModelSerializer):
)
instance.created = new_datetime
instance.save()
validated_data.pop("created_date")
if "created_date" in validated_data:
validated_data.pop("created_date")
super().update(instance, validated_data)
return instance