Commit bde72554 by Tom Christie

Fix non-determanistic default bug. Closes #2099.

parent 40b1ea91
......@@ -757,7 +757,7 @@ class ModelSerializer(Serializer):
elif getattr(unique_constraint_field, 'auto_now', None):
default = timezone.now
elif unique_constraint_field.has_default():
default = model_field.default
default = unique_constraint_field.default
else:
default = empty
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment