forked from MarseyWorld/MarseyWorld
better v.poor code
parent
4c9858f143
commit
443615e14f
|
@ -253,6 +253,11 @@ class User(Base):
|
|||
|
||||
return (succeeded, charged_coins)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def poor(self):
|
||||
return session.get('poor')
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def num_of_bought_awards(self):
|
||||
|
|
|
@ -138,8 +138,7 @@ def settings_personal_post(v):
|
|||
v.reddit = reddit
|
||||
elif request.values.get("poor", v.poor) != v.poor:
|
||||
updated = True
|
||||
v.poor = request.values.get("poor", v.poor) == 'true'
|
||||
session['poor'] = v.poor
|
||||
session['poor'] = request.values.get("poor", v.poor) == 'true'
|
||||
|
||||
slur_filter_updated = updated or update_potentially_permanent_flag("slurreplacer", "slurreplacer", "slur replacer", 192)
|
||||
if isinstance(slur_filter_updated, bool):
|
||||
|
|
|
@ -108,7 +108,6 @@ def get_logged_in_user():
|
|||
g.v = v
|
||||
|
||||
if v:
|
||||
v.poor = session.get('poor')
|
||||
# Check against last_active + ACTIVE_TIME to reduce frequency of
|
||||
# UPDATEs in exchange for a ±ACTIVE_TIME margin of error.
|
||||
|
||||
|
|
Loading…
Reference in New Issue