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

Replace unique_together with UniqueConstraints

This commit is contained in:
jeremystretch
2022-09-27 15:35:24 -04:00
parent ec6457bcd3
commit f51415cf2c
20 changed files with 630 additions and 142 deletions

View File

@@ -106,10 +106,9 @@ class ProviderNetwork(NetBoxModel):
constraints = (
models.UniqueConstraint(
fields=('provider', 'name'),
name='circuits_providernetwork_provider_name'
name='%(app_label)s_%(class)s_unique_provider_name'
),
)
unique_together = ('provider', 'name')
def __str__(self):
return self.name