Use getattr instead of hasattr to make sure custom validation is triggered as normal

This commit is contained in:
kkthxbye-code 2023-02-08 12:18:06 +01:00
parent a1ff3800c7
commit a4700bc498

View File

@ -258,7 +258,7 @@ class CustomValidationMixin(models.Model):
super().clean()
# If the instance is a base for replications, skip custom validation
if hasattr(self, '_replicated_base'):
if getattr(self, '_replicated_base', False):
return
# Send the post_clean signal