change: change filter name
This commit is contained in:
@@ -4,12 +4,12 @@ from core.apps.wherehouse.models import InvalidProduct
|
||||
|
||||
|
||||
class InvalidProductFilter(django_filters.FilterSet):
|
||||
start_date = django_filters.DateFilter(field_name='expiry_date', lookup_expr='gte')
|
||||
end_date = django_filters.DateFilter(field_name='expiry_date', lookup_expr='lte')
|
||||
expiry_date_start = django_filters.DateFilter(field_name='expiry_date', lookup_expr='gte')
|
||||
expiry_date_end = django_filters.DateFilter(field_name='expiry_date', lookup_expr='lte')
|
||||
|
||||
class Meta:
|
||||
model = InvalidProduct
|
||||
fields = [
|
||||
'wherehouse', 'project_folder', 'status', 'invalid_status',
|
||||
'witnesses', 'expiry_date', 'start_date', 'end_date',
|
||||
'witnesses', 'expiry_date', 'expiry_date_start', 'expiry_date_end',
|
||||
]
|
||||
@@ -24,6 +24,8 @@ class InventoryListApiView(generics.GenericAPIView):
|
||||
project_folder_ids = request.query_params.getlist('project_folder_id')
|
||||
project_ids = request.query_params.getlist('project_ids')
|
||||
product_exists = request.query_params.get('product_exist')
|
||||
start_date = request.query_params.get('start_date')
|
||||
start_date = request.query_params.get('end_date')
|
||||
inventories = self.filter_queryset(self.queryset)
|
||||
|
||||
if wherehouse_ids:
|
||||
|
||||
Reference in New Issue
Block a user