fix model

This commit is contained in:
Arthur Hanson 2024-11-04 08:40:40 -08:00
parent 72712cc78b
commit e0b4867eca

View File

@ -1,4 +1,3 @@
from django.contrib.contenttypes.fields import GenericForeignKey
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import gettext_lazy as _
@ -108,22 +107,6 @@ class WirelessLAN(WirelessAuthenticationBase, CachedScopeMixin, PrimaryModel):
blank=True,
null=True
)
scope_type = models.ForeignKey(
to='contenttypes.ContentType',
on_delete=models.PROTECT,
limit_choices_to=models.Q(model__in=WIRELESSLAN_SCOPE_TYPES),
related_name='+',
blank=True,
null=True
)
scope_id = models.PositiveBigIntegerField(
blank=True,
null=True
)
scope = GenericForeignKey(
ct_field='scope_type',
fk_field='scope_id'
)
clone_fields = ('ssid', 'group', 'scope_type', 'scope_id', 'tenant', 'description')