Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix search in dashboard

Jakub Draganek079871934fba
diff --git a/saleor/search/backends/dashboard.py b/saleor/search/backends/dashboard.py
index 37ad6d6394..1e5c6d6e34 100644
--- a/saleor/search/backends/dashboard.py
+++ b/saleor/search/backends/dashboard.py
@@ -94,7 +94,7 @@ class DashboardSearchResults(DEFAULT_BACKEND_RESULTS_CLASS):
scores = {}
for hit in hits['hits']['hits']:
hit_type = hit['_type']
- hit_pk = hit['fields']['pk'][0]
+ hit_pk = hit['_source']['pk']
search_hits[hit_type].append(hit_pk)
scores[hit['_id']] = hit['_score']