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