fddf
This commit is contained in:
parent
9fc47b90f7
commit
9a9c2216e1
3 changed files with 6 additions and 4 deletions
|
@ -40,7 +40,8 @@ def agendaposters(v):
|
||||||
@admin_level_required(3)
|
@admin_level_required(3)
|
||||||
def image_posts_listing(v):
|
def image_posts_listing(v):
|
||||||
|
|
||||||
page = int(request.args.get('page', 1))
|
try: page = int(request.args.get('page', 1))
|
||||||
|
except: page = 1
|
||||||
|
|
||||||
posts = g.db.query(Submission).order_by(Submission.id.desc())
|
posts = g.db.query(Submission).order_by(Submission.id.desc())
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@ def notifications(v):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page = int(request.args.get('page', 1))
|
try: page = int(request.args.get('page', 1))
|
||||||
|
except: page = 1
|
||||||
all_ = request.args.get('all', False)
|
all_ = request.args.get('all', False)
|
||||||
messages = request.args.get('messages', False)
|
messages = request.args.get('messages', False)
|
||||||
posts = request.args.get('posts', False)
|
posts = request.args.get('posts', False)
|
||||||
|
|
|
@ -126,8 +126,8 @@ def messagereply(v, username, id):
|
||||||
notif = Notification(comment_id=new_comment.id, user_id=user.id)
|
notif = Notification(comment_id=new_comment.id, user_id=user.id)
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
if not request.referrer or request.referrer.endswith('/notifications'): return redirect(f"/notifications?all=true/#comment-")
|
if not request.referrer or request.referrer.endswith('/notifications'): return redirect(f"/notifications?all=true#comment-{new_comment.id}")
|
||||||
else: return redirect(request.referrer)
|
else: return redirect(f"{request.referrer}#comment-{new_comment.id}")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/songs/<id>")
|
@app.get("/songs/<id>")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue