Exclude limited-edition hats from profile counter.
parent
0c8b0d531b
commit
0ea738f1bc
|
@ -201,7 +201,7 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def hats_owned_proportion_display(self):
|
||||
total_num_of_hats = g.db.query(HatDef).filter(HatDef.submitter_id == None).count()
|
||||
total_num_of_hats = g.db.query(HatDef).filter(HatDef.submitter_id == None, HatDef.price > 0).count()
|
||||
proportion = f'{float(self.num_of_owned_hats) / total_num_of_hats:.1%}'
|
||||
return (proportion, total_num_of_hats)
|
||||
|
||||
|
|
Loading…
Reference in New Issue