mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Format with Black
This commit is contained in:
parent
d36699bd1f
commit
02d99a1671
5 changed files with 35 additions and 27 deletions
|
@ -170,7 +170,12 @@ def modify_group():
|
|||
if group.author_id != current_user.id:
|
||||
abort(403)
|
||||
|
||||
if action == "add" and not GroupJunction.query.filter_by(group_id=group_id, post_id=image_id).first():
|
||||
if (
|
||||
action == "add"
|
||||
and not GroupJunction.query.filter_by(
|
||||
group_id=group_id, post_id=image_id
|
||||
).first()
|
||||
):
|
||||
db.session.add(GroupJunction(group_id=group_id, post_id=image_id))
|
||||
elif request.form["action"] == "remove":
|
||||
GroupJunction.query.filter_by(group_id=group_id, post_id=image_id).delete()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue