better var name

pull/222/head
Aevann 2024-02-15 22:14:28 +02:00
parent 23ddbd047e
commit 946eb07949
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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 %}