forked from MarseyWorld/MarseyWorld
better var name
parent
23ddbd047e
commit
946eb07949
|
@ -31,7 +31,7 @@ class Hole(Base):
|
|||
|
||||
blocks = relationship("HoleBlock", primaryjoin="HoleBlock.hole==Hole.name")
|
||||
followers = relationship("HoleFollow", primaryjoin="HoleFollow.hole==Hole.name")
|
||||
joins = relationship("StealthHoleUnblock", lazy="dynamic", primaryjoin="StealthHoleUnblock.hole==Hole.name")
|
||||
stealth_hole_unblock = relationship("StealthHoleUnblock", lazy="dynamic", primaryjoin="StealthHoleUnblock.hole==Hole.name")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
if "created_utc" not in kwargs: kwargs["created_utc"] = int(time.time())
|
||||
|
@ -60,8 +60,8 @@ class Hole(Base):
|
|||
|
||||
@property
|
||||
@lazy
|
||||
def join_num(self):
|
||||
return self.joins.count()
|
||||
def stealth_hole_unblock_number(self):
|
||||
return self.stealth_hole_unblocks.count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<td><a href="/h/{{hole}}">{{count}}</a></td>
|
||||
<td><a href="/h/{{hole}}/followers">{{hole.follow_num}}</a></td>
|
||||
{% if hole.stealth %}
|
||||
<td>{{total_users - hole.join_num}}</td>
|
||||
<td>{{total_users - hole.stealth_hole_unblock_number}}</td>
|
||||
{% else %}
|
||||
<td><a href="/h/{{hole}}/blockers">{{hole.block_num}}</a></td>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue