mixins.py
20.4 KB
-
FIX: ModelViews can have Resources whose models have unique fields. · 60cd5363
ReadModelMixin and UpdateModelMixin store model instance as a property. This allows ModelResource to bind the ModelForm using the model instance making the form validate the input data against the model instance and not a brand new instance. When the latter happened and the model used unique fields, the form validation failed whenever a PUT was maintaining the previuos value of the unique field.
Fernando Zunino committed