forked from MarseyWorld/MarseyWorld
rename function
parent
17c56fa776
commit
c8d6872761
|
@ -177,7 +177,7 @@ class User(Base):
|
|||
sub_mods = relationship("Mod", primaryjoin="User.id == Mod.user_id", lazy="raise")
|
||||
sub_exiles = relationship("Exile", primaryjoin="User.id == Exile.user_id", lazy="raise")
|
||||
|
||||
lifetime_donated = deferred(Column(Integer, server_default=FetchedValue()))
|
||||
lifetimedonated = deferred(Column(Integer, server_default=FetchedValue()))
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
|
@ -251,6 +251,11 @@ class User(Base):
|
|||
|
||||
return (succeeded, charged_coins)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def lifetime_donated(self):
|
||||
return self.lifetimedonated or 0
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def num_of_bought_awards(self):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
create function public.lifetime_donated(public.users) returns integer
|
||||
create function public.lifetimedonated(public.users) returns integer
|
||||
language sql immutable strict
|
||||
as $_$
|
||||
select sum(amount)
|
||||
|
|
Loading…
Reference in New Issue