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

#3892: Convert CABLE_TERMINATION_TYPES to a Q object

This commit is contained in:
Jeremy Stretch
2020-01-15 15:51:51 -05:00
parent b98ac64ac2
commit f8dad1744c
6 changed files with 48 additions and 15 deletions

View File

@@ -1939,7 +1939,7 @@ class Cable(ChangeLoggedModel):
"""
termination_a_type = models.ForeignKey(
to=ContentType,
limit_choices_to={'model__in': CABLE_TERMINATION_TYPES},
limit_choices_to=CABLE_TERMINATION_MODELS,
on_delete=models.PROTECT,
related_name='+'
)
@@ -1950,7 +1950,7 @@ class Cable(ChangeLoggedModel):
)
termination_b_type = models.ForeignKey(
to=ContentType,
limit_choices_to={'model__in': CABLE_TERMINATION_TYPES},
limit_choices_to=CABLE_TERMINATION_MODELS,
on_delete=models.PROTECT,
related_name='+'
)