Fix case for filtering parts by IPN

This commit is contained in:
Oliver 2021-07-09 09:08:55 +10:00
parent 433098ce6e
commit fd5d20ad13

View File

@ -426,14 +426,14 @@ class PartFilter(rest_filters.FilterSet):
queryset = queryset.filter(IPN='')
# Exact match for IPN
ipn = rest_filters.CharFilter(
IPN = rest_filters.CharFilter(
label='Filter by exact IPN (internal part number)',
field_name='IPN',
lookup_expr="iexact"
)
# Regex match for IPN
ipn_regex = rest_filters.CharFilter(
IPN_regex = rest_filters.CharFilter(
label='Filter by regex on IPN (internal part number) field',
field_name='IPN', lookup_expr='iregex'
)