DRF Serializers dont call model clean
#433
Labels
bug::regression
Bug reason
type::bug
Issue Type
v1.4.0
Version Affected.
v1.5.0
Version Affected.
v1.6-beta
Version Affected.
Milestone
A change was made in DRF 3.0 that removed the feature from the Serializers that calls the models
clean
method.Serilaizers within Centurion still need to call a models
clean
method.Details
We use the Model
clean
method as it was intended, to make any changes that must be done to a model prior to saving, regardless of the data ingress point.As we move Centurion to be predominately an API application, 99% of data ingress will be via a serializer, and the lack of calling the
clean
method from a serializer is not an issue. However, we do have management commands and have celery tasks as data ingress points. As such a modelsclean
method is still in play and required that it be called.discovered models affected.
Testing
Any model that has a clean method, must be tested to ensure that the
clean
method is called prior to saving the model.Links
Requirements
When a global org is set and manufactures as global is true, ALL manufacturers on creation are supposed to be moved to the global organization. This is not occurring.
The text was updated successfully, but these errors were encountered: