1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Adds full_clean in examples (#12527)

* adds full_clean in examples #11689

* removes extra info
This commit is contained in:
Abhimanyu Saharan
2023-05-09 18:01:50 +05:30
committed by GitHub
parent cb6852bf7a
commit 1af3ba9496
2 changed files with 4 additions and 6 deletions

View File

@ -378,6 +378,7 @@ class NewBranchScript(Script):
slug=slugify(data['site_name']),
status=SiteStatusChoices.STATUS_PLANNED
)
site.full_clean()
site.save()
self.log_success(f"Created new site: {site}")
@ -391,6 +392,7 @@ class NewBranchScript(Script):
status=DeviceStatusChoices.STATUS_PLANNED,
device_role=switch_role
)
switch.full_clean()
switch.save()
self.log_success(f"Created new switch: {switch}")