Verified Commit 0ff9dd7f authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Add Clean fields to exclude validation.

parent fb539ce7
Pipeline #36570 failed with stages
in 18 minutes and 15 seconds
......@@ -20,7 +20,7 @@ class NOCModelBase(ModelBase):
:param kwargs:
:return:
"""
self.full_clean(validate_unique=False)
self.full_clean(validate_unique=False, exclude=getattr(self, "_clean_fields", None))
super(m, self).save(*args, **kwargs)
is_base = name == "NOCModel"
......
......@@ -123,6 +123,7 @@ class Address(NOCModel):
)
csv_ignored_fields = ["prefix"]
_clean_fields = ["vrf", "prefix", "afi"]
def __str__(self):
return "%s(%s): %s" % (self.vrf.name, self.afi, self.address)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment