Djent
Djent

Reputation: 3467

Overriding save method issues

I'm trying to override default save method according to this article, but in both ways I'm getting following error:

Here is whole class - what am I doing wrong?

Upvotes: 0

Views: 55

Answers (1)

mipadi
mipadi

Reputation: 410612

  1. The call to the superclass's save method should happen in the class's save method (that line is not indented properly, so it's not within the save method.
  2. You should call super with the current class, so super(Exc, self).save(*args, **kwargs).

Upvotes: 4

Related Questions