diff options
author | 2022-03-14 07:14:49 +0300 | |
---|---|---|
committer | 2022-03-14 07:14:49 +0300 | |
commit | 27b0c38694f6bdd557c58a6bd6c49e5c95d5cfa5 (patch) | |
tree | 7dd5343a0c143d476c4ce393c603f09c1980f32d /backend/discord.py | |
parent | Add Default Attribute For Form Access Helper (diff) |
Explicitly Use `_id` Over `id`
Co-authored-by: Kieran Siek <[email protected]>
Diffstat (limited to 'backend/discord.py')
-rw-r--r-- | backend/discord.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/discord.py b/backend/discord.py index 5a734db..be12109 100644 --- a/backend/discord.py +++ b/backend/discord.py @@ -164,12 +164,12 @@ async def _verify_access_helper( form_id: str, request: starlette.requests.Request, attribute: str ) -> None: """A low level helper to validate access to a form resource based on the user's scopes.""" - form = await request.state.db.forms.find_one({"id": form_id}) + form = await request.state.db.forms.find_one({"_id": form_id}) if not form: raise FormNotFoundError(status_code=404) - # Short circuit all resources for admins + # Short circuit all resources for forms admins if "admin" in request.auth.scopes: return |