fix bad ref

migrate-new-models
lza_menace 2 years ago
parent 289995cd49
commit 0d02bf63f7

@ -25,7 +25,7 @@ def read(id):
post = Post.select().where(Post.id == id).first()
if post:
if not post.approved:
if not is_moderator(get_session_user()):
if not User.select().where(User.username == get_session_user()).first().moderator:
flash("That post has not been approved.", "is-warning")
return redirect("/")
qr_uri = f'wownero:{post.address}?tx_description=suchwow%20post%20{post.id}'