#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 217a41542e
commit 4909a8b672
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='+'
)