added original name for user.json

master
Captain 2022-12-15 19:37:29 +01:00 committed by Gitea
parent bd8ac649d4
commit 84cfc21b0b
1 changed files with 2 additions and 0 deletions

View File

@ -812,6 +812,7 @@ class User(Base):
def json(self):
if self.is_suspended:
return {'username': self.username,
'original_username': self.original_username,
'url': self.url,
'is_banned': True,
'is_permanent_ban': not bool(self.unban_utc),
@ -822,6 +823,7 @@ class User(Base):
return {'username': self.username,
'original_username': self.original_username,
'url': self.url,
'is_banned': bool(self.is_banned),
'created_utc': self.created_utc,