This commit is contained in:
Aevann1 2021-11-26 21:56:20 +02:00
parent e3137813c9
commit 13014aaea0
7 changed files with 62 additions and 5 deletions

View file

@ -2,6 +2,7 @@ from sqlalchemy import *
from sqlalchemy.orm import relationship
from files.__main__ import Base
from files.helpers.lazy import lazy
from files.helpers.const import censor_slurs
import time
class Flag(Base):
@ -29,6 +30,10 @@ class Flag(Base):
def created_datetime(self):
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))
@lazy
def realreason(self, v):
return censor_slurs(self.reason, v)
class CommentFlag(Base):
@ -53,4 +58,8 @@ class CommentFlag(Base):
@property
@lazy
def created_datetime(self):
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))
@lazy
def realreason(self, v):
return censor_slurs(self.reason, v)