aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-01-04 19:12:21 +0200
committerGravatar GitHub <[email protected]>2021-01-04 19:12:21 +0200
commit6d0324e6e8e4ec7dda216a6a42dffce4185261d9 (patch)
tree9fae13a77b4ac93b44413eef16f43cc42c1c03ff /backend
parentAdd question model required field documentation to SCHEMA.md (diff)
Use $in operator for non-admin filtering to allow fetching closed forms
This was OPEN before, but we need to return discoverable closed forms too.
Diffstat (limited to 'backend')
-rw-r--r--backend/routes/forms/form.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/routes/forms/form.py b/backend/routes/forms/form.py
index 8ecfdf6..b6b722e 100644
--- a/backend/routes/forms/form.py
+++ b/backend/routes/forms/form.py
@@ -33,7 +33,7 @@ class SingleForm(Route):
}
if not admin:
- filters["features"] = "OPEN"
+ filters["features"] = {"$in": ["OPEN", "DISCOVERABLE"]}
if raw_form := await request.state.db.forms.find_one(filters):
form = Form(**raw_form)