forked from rDrama/rDrama
fix ban_reason getting wiped accidentially
parent
e50bbe0da0
commit
cc7176868d
|
@ -1157,7 +1157,8 @@ def unban_user(id, v):
|
|||
|
||||
user.is_banned = None
|
||||
user.unban_utc = 0
|
||||
user.ban_reason = None
|
||||
if not user.shadowbanned:
|
||||
user.ban_reason = None
|
||||
send_repeatable_notification(user.id, f"@{v.username} (a site admin) has unbanned you!")
|
||||
g.db.add(user)
|
||||
|
||||
|
@ -1165,7 +1166,8 @@ def unban_user(id, v):
|
|||
if x.is_banned: send_repeatable_notification(x.id, f"@{v.username} (a site admin) has unbanned you!")
|
||||
x.is_banned = None
|
||||
x.unban_utc = 0
|
||||
x.ban_reason = None
|
||||
if not x.shadowbanned:
|
||||
x.ban_reason = None
|
||||
g.db.add(x)
|
||||
|
||||
ma=ModAction(
|
||||
|
|
|
@ -269,7 +269,8 @@ def award_thing(v, thing_type, id):
|
|||
else:
|
||||
author.unban_utc = 0
|
||||
author.is_banned = None
|
||||
author.ban_reason = None
|
||||
if not author.shadowbanned:
|
||||
author.ban_reason = None
|
||||
send_repeatable_notification(author.id, "You have been unbanned!")
|
||||
elif kind == "grass":
|
||||
link3 = f"/{thing_type}/{thing.id}"
|
||||
|
|
Loading…
Reference in New Issue