nsot icon indicating copy to clipboard operation
nsot copied to clipboard

Refactor common model helpers/validators into a single place

Open jathanism opened this issue 7 years ago • 0 comments

Following #317 @narJH27 had this feedback:

This looks great! Just one suggestion from my end, there are too many repetitions of clean_site(), clean_fields() and save() which I feel could easily be moved to a base class from where the specific model classes could subclass and overload the methods if needed. This is just to avoid duplication of the same block of code over and over again.

This is a great idea for the V2 API, to reduce duplication.

jathanism avatar Feb 22 '18 17:02 jathanism