[Django]-Django model class decorator


You do not need to explicitly pass a reference to self on this line:

val = self.__old_save(self, *args, **kwargs)

It is a method being called on an object reference. Passing it explicitly in this way is causing it to be seen as one of the other parameters of the save method, one which is expected to be a string or a number.

Leave a comment