Example #1
0
 def process(self):
     coll = Collection(**self.data)
     errors = Collection.persist_new_version(coll, self.user)
     return errors or UPDATED
Example #2
0
 def create_version(self, validated_data):
     collection = self.prepare_object(validated_data)
     user = self.context['request'].user
     errors = Collection.persist_new_version(collection, user)
     self._errors.update(errors)
     return collection