Fix missing None check

This commit is contained in:
Tim Van Baak 2021-08-27 07:50:48 -07:00
parent af5b1c4cfa
commit 9f939fe57c
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ def editor_required(route):
user: User = current_user
lexicon: Lexicon = g.lexicon
mem: Optional[Membership] = memq.try_from_ids(db, user.id, lexicon.id)
if not mem.is_editor:
if not mem or not mem.is_editor:
flash("You must be the editor to view this page")
return redirect(url_for('lexicon.contents', name=lexicon.name))
return route(*args, **kwargs)