Skip to content

Commit ca52b82

Browse files
committed
Debg
1 parent e404987 commit ca52b82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

validators.py

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
class DNSValidator(CustomValidator):
44
def validate(self, instance):
5+
print(instance)
56
from netbox_dns.models import Record, RecordTypeChoices
67
if instance.type == RecordTypeChoices.AAAA:
78
records = Record.objects.filter(name=instance.name, zone=instance.zone, type=RecordTypeChoices.A)
@@ -22,6 +23,7 @@ def validate(self, instance):
2223
if records.exists():
2324
self.fail("Record for this name in this zone already exists!", field='name')
2425
records = Record.objects.filter(name=instance.name, zone=instance.zone, type=instance.type)
26+
print(records)
2527
if records.exists():
2628
self.fail("Record of given type for this name in this zone already exists!", field='name')
2729

0 commit comments

Comments
 (0)