#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

@@ -3374,9 +3374,7 @@ class CableCSVForm(forms.ModelForm):
)
side_a_type = forms.ModelChoiceField(
queryset=ContentType.objects.all(),
limit_choices_to={
'model__in': CABLE_TERMINATION_TYPES,
},
limit_choices_to=CABLE_TERMINATION_MODELS,
to_field_name='model',
help_text='Side A type'
)
@@ -3395,9 +3393,7 @@ class CableCSVForm(forms.ModelForm):
)
side_b_type = forms.ModelChoiceField(
queryset=ContentType.objects.all(),
limit_choices_to={
'model__in': CABLE_TERMINATION_TYPES,
},
limit_choices_to=CABLE_TERMINATION_MODELS,
to_field_name='model',
help_text='Side B type'
)