This commit is contained in:
Michał 2023-04-12 15:21:56 +00:00
parent 02d99a1671
commit cc613f9fe9
2 changed files with 2 additions and 2 deletions

View file

@ -165,7 +165,7 @@ def modify_group():
action = request.form["action"] action = request.form["action"]
group = db.get_or_404(Group, group_id) group = db.get_or_404(Group, group_id)
image = db.get_or_404(Post, image_id) db.get_or_404(Post, image_id) # Check if image exists
if group.author_id != current_user.id: if group.author_id != current_user.id:
abort(403) abort(403)

View file

@ -3,7 +3,7 @@ Onlylegs - Image Groups
Why groups? Because I don't like calling these albums Why groups? Because I don't like calling these albums
sounds more limiting that it actually is in this gallery sounds more limiting that it actually is in this gallery
""" """
from flask import Blueprint, abort, render_template, url_for from flask import Blueprint, render_template, url_for
from gallery.models import Post, User, GroupJunction, Group from gallery.models import Post, User, GroupJunction, Group
from gallery.extensions import db from gallery.extensions import db