def update(self, obj): """ Uses the serializer to update with self.data """ ser = TransactionSerializer(obj, data=self.data) ser.is_valid(True) return ser.save()
def create(self): """ Uses the serializer to create with self.data """ ser = TransactionSerializer(data=self.data) ser.is_valid(True) return ser.save()