mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Use getattr instead of hasattr to make sure custom validation is triggered as normal
This commit is contained in:
parent
a1ff3800c7
commit
a4700bc498
@ -258,7 +258,7 @@ class CustomValidationMixin(models.Model):
|
|||||||
super().clean()
|
super().clean()
|
||||||
|
|
||||||
# If the instance is a base for replications, skip custom validation
|
# If the instance is a base for replications, skip custom validation
|
||||||
if hasattr(self, '_replicated_base'):
|
if getattr(self, '_replicated_base', False):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Send the post_clean signal
|
# Send the post_clean signal
|
||||||
|
Loading…
Reference in New Issue
Block a user