Skip to content

Commit

Permalink
Merge pull request #3795 from allegro/search_multiple_barcodes
Browse files Browse the repository at this point in the history
Allow to search for multiple barcodes
  • Loading branch information
awieckowski authored Mar 4, 2024
2 parents a451b11 + b11b705 commit 938705e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ralph/back_office/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ class BackOfficeAssetAdmin(
def get_search_results(self, request, queryset, search_term):
queryset, use_distinct = super().get_search_results(request, queryset, search_term) # noqa
if 'barcode' in request.GET:
barcode = request.GET.get('barcode')
queryset = self.model.objects.filter(barcode__exact=barcode)
barcode = request.GET.get('barcode').split(";")
queryset = self.model.objects.filter(barcode__in=barcode)
return queryset, use_distinct

list_filter = [
Expand Down

0 comments on commit 938705e

Please sign in to comment.