Skip to content

Commit 0ea6b90

Browse files
Merge pull request #108 from ProteinsWebTeam/dev
fix has_model
2 parents 98187c1 + 7b41e08 commit 0ea6b90

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# remember to check the version is compatible with python 3.6
2-
selenium~=3.141
2+
selenium==4.9.0
33
django-debug-toolbar~=3.2
44
ipdb==0.13.9
55
coveralls==3.3.1

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# remember to check the version is compatible with python 3.6
2-
Django==3.2.18
2+
Django==3.2.19
33
djangorestframework==3.13.1
44
PyYAML==6.0
55
jsonfield2==4.0.0.post0
66
pymysql==1.0.2
77
django-cors-headers~=3.10
88
gunicorn==20.1.0
99
django-redis==5.2.0
10-
redis==4.3.4
10+
redis==4.4.4
1111
requests~=2.27

webfront/searcher/elastic_controller.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ def get_group_obj_of_field_by_query(
268268
self.add_subterm_aggs(obj, f, rows)
269269
obj = obj["aggs"]["subgroups"]
270270
if fq is not None:
271-
query += " && " + fq
271+
# the query might have a sorting parameter, so fq needs to be prepend
272+
query = fq + " && " + query
272273
response = self._elastic_json_query(query, facet)
273274
buckets = response["aggregations"]["groups"]["buckets"]
274275
if len(buckets) > 0 and "tops" not in buckets[0]:
@@ -412,7 +413,7 @@ def execute_query(self, query, fq=None, rows=0, query_obj=None, is_ida=False):
412413
query = self.queryset_manager.get_searcher_query()
413414
q = query
414415
if fq is not None:
415-
q = query + " && " + fq.lower()
416+
q = fq.lower() + " && " + query
416417
q = (
417418
q.replace(" && ", "%20AND%20")
418419
.replace(" || ", "%20OR%20")

0 commit comments

Comments
 (0)