Skip to content

Commit 6b0619b

Browse files
Fix NoneType Access Error For Form Editors
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
1 parent bd57964 commit 6b0619b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/discord.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async def _verify_access_helper(
175175

176176
form = models.Form(**form)
177177

178-
for role_id in getattr(form, attribute, []):
178+
for role_id in getattr(form, attribute, None) or []:
179179
role = await request.state.db.roles.find_one({"id": role_id})
180180
if not role:
181181
continue

0 commit comments

Comments
 (0)