mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
Fix typo: add community ban_util date if it's in the future
This commit is contained in:
parent
2ddda35375
commit
0cc7232409
1 changed files with 1 additions and 1 deletions
|
@ -1177,7 +1177,7 @@ def community_ban_user(community_id: int, user_id: int):
|
|||
if not existing:
|
||||
new_ban = CommunityBan(community_id=community_id, user_id=user.id, banned_by=current_user.id,
|
||||
reason=form.reason.data)
|
||||
if form.ban_until.data is not None and form.ban_until.data < utcnow().date():
|
||||
if form.ban_until.data is not None and form.ban_until.data > utcnow().date():
|
||||
new_ban.ban_until = form.ban_until.data
|
||||
db.session.add(new_ban)
|
||||
db.session.commit()
|
||||
|
|
Loading…
Add table
Reference in a new issue