created_date is not supposed to be required

This commit is contained in:
Michael Shamoon 2022-08-13 07:13:51 -07:00
parent 9e9593b899
commit 8183de4902

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