mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-14 07:42:18 -06:00
Merge pull request #19070 from netbox-community/17166-remove-limit_choices_to
Closes #17166: Remove obsolete `limit_choices_to` argument from ForeignKey & M2M fields
This commit is contained in:
@@ -72,14 +72,6 @@ class Migration(migrations.Migration):
|
||||
(
|
||||
'assigned_object_type',
|
||||
models.ForeignKey(
|
||||
limit_choices_to=models.Q(
|
||||
models.Q(
|
||||
models.Q(('app_label', 'dcim'), ('model', 'interface')),
|
||||
models.Q(('app_label', 'ipam'), ('model', 'vlan')),
|
||||
models.Q(('app_label', 'virtualization'), ('model', 'vminterface')),
|
||||
_connector='OR',
|
||||
)
|
||||
),
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
related_name='+',
|
||||
to='contenttypes.contenttype',
|
||||
|
||||
@@ -8,7 +8,6 @@ from core.models import ObjectType
|
||||
from netbox.models import NetBoxModel, PrimaryModel
|
||||
from netbox.models.features import ContactsMixin
|
||||
from vpn.choices import L2VPNStatusChoices, L2VPNTypeChoices
|
||||
from vpn.constants import L2VPN_ASSIGNMENT_MODELS
|
||||
|
||||
__all__ = (
|
||||
'L2VPN',
|
||||
@@ -93,7 +92,6 @@ class L2VPNTermination(NetBoxModel):
|
||||
)
|
||||
assigned_object_type = models.ForeignKey(
|
||||
to='contenttypes.ContentType',
|
||||
limit_choices_to=L2VPN_ASSIGNMENT_MODELS,
|
||||
on_delete=models.PROTECT,
|
||||
related_name='+'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user