Skip to content

Commit

Permalink
fix: call super mehtod of Product before logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mumarkhan999 committed Dec 21, 2023
1 parent ce49f78 commit 78d3735
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ecommerce/extensions/catalogue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def is_executive_education_2u_product(self):
]

def save(self, *args, **kwargs):
super(Product, self).save(*args, **kwargs) # pylint: disable=bad-super-call
try:
if not isinstance(self.attr.note, str) and self.attr.note is not None:
log_message_and_raise_validation_error(
Expand All @@ -116,8 +117,6 @@ def save(self, *args, **kwargs):
except AttributeError:
pass

super(Product, self).save(*args, **kwargs) # pylint: disable=bad-super-call


@receiver(post_init, sender=Product)
def update_original_expires(sender, **kwargs): # pylint: disable=unused-argument
Expand Down

0 comments on commit 78d3735

Please sign in to comment.