aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-02-25 14:43:35 +0100
committerGravatar Matteo Bertucci <[email protected]>2021-02-25 14:43:35 +0100
commite46047da80d1141849e0ac755b83ef50f47bd53c (patch)
treeb157bb8f27f498a606e402ad65d5d3e67138cdd5
parentMake use of list.copy() instead of [:] (diff)
Only filter units if we aren't using an admin token
-rw-r--r--backend/routes/forms/form.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/routes/forms/form.py b/backend/routes/forms/form.py
index deb03ae..dd1c83f 100644
--- a/backend/routes/forms/form.py
+++ b/backend/routes/forms/form.py
@@ -38,7 +38,8 @@ class SingleForm(Route):
if raw_form := await request.state.db.forms.find_one(filters):
form = Form(**raw_form)
- form = filter_unittests(form)
+ if not admin:
+ form = filter_unittests(form)
return JSONResponse(form.dict(admin=admin))