aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-06-13 22:28:58 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-06-13 22:28:58 +0400
commit6b0619b4d1ff1e779ebeeb1a418b9d13d62fd1d3 (patch)
tree19ac1885bf312cec66a680f62a92a94d6dc29d9c /backend
parentMerge pull request #168 from python-discord/dependabot/pip/pyjwt-2.4.0 (diff)
Fix NoneType Access Error For Form Editors
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend')
-rw-r--r--backend/discord.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/discord.py b/backend/discord.py
index be12109..ff6c1bb 100644
--- a/backend/discord.py
+++ b/backend/discord.py
@@ -175,7 +175,7 @@ async def _verify_access_helper(
form = models.Form(**form)
- for role_id in getattr(form, attribute, []):
+ for role_id in getattr(form, attribute, None) or []:
role = await request.state.db.roles.find_one({"id": role_id})
if not role:
continue