nsot
nsot copied to clipboard
Refactor common model helpers/validators into a single place
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.