diff --git a/files/classes/hole.py b/files/classes/hole.py index f23591e49..0cfa9d530 100644 --- a/files/classes/hole.py +++ b/files/classes/hole.py @@ -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 diff --git a/files/templates/hole/holes.html b/files/templates/hole/holes.html index 1c04ccc06..d38d40447 100644 --- a/files/templates/hole/holes.html +++ b/files/templates/hole/holes.html @@ -22,7 +22,7 @@ {{count}} {{hole.follow_num}} {% if hole.stealth %} - {{total_users - hole.join_num}} + {{total_users - hole.stealth_hole_unblock_number}} {% else %} {{hole.block_num}} {% endif %}