We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 571608b commit 8e39160Copy full SHA for 8e39160
backend/PyMatcha/routes/api/search.py
@@ -23,7 +23,7 @@
23
24
25
@search_bp.route("/search", methods=["POST"])
26
-@validate_params(REQUIRED_PARAMS_SEARCH)
+@validate_params(REQUIRED_PARAMS_SEARCH, allow_empty=True)
27
@jwt_required
28
def search():
29
data = request.get_json()
@@ -59,8 +59,9 @@ def search():
59
60
if max_distance != -1:
61
distance = _get_distance(current_user.geohash, user.geohash)
62
- if distance > max_distance:
63
- continue
+ if distance:
+ if distance > max_distance:
64
+ continue
65
66
if tags:
67
user_tags = [t.name for t in user.get_tags()]
0 commit comments