From 946eb0794938a5847bd0bc46a1e59567aad7ffd5 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 15 Feb 2024 22:14:28 +0200 Subject: [PATCH] better var name --- files/classes/hole.py | 6 +++--- files/templates/hole/holes.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 %}