myyang / django-pb-model

Protobuf mixin for django model
Other
112 stars 22 forks source link

models: prevent defaults discarded #25

Closed myyang closed 4 years ago

myyang commented 4 years ago

The defaults are all discarded when there is custom serializer for partial field and break implicit convention of model usage. Check also: https://github.com/myyang/django-pb-model/issues/21

To provide easily usage of model and flexible fields overwritten, this commit changes defaults to hidden maps and update/overwrite with client defined map.

After this commit, serialization behaviors would be changed if user uses empty map to disable custom serialization so the version would bump into 0.2.0.

myyang commented 4 years ago

@davilaerte please help check this changes. Thanks!

myyang commented 4 years ago

Fix #21