Skip to content

Commit 506b988

Browse files
committed
Fix property naming
1 parent 56015c2 commit 506b988

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/teams/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,6 @@ def for_sale_users(self) -> list[TeamMember]:
622622
return [member.user for member in self.team_members.filter(teamshiftassignment__for_sale=True)]
623623

624624
@property
625-
def shifts_available(self) -> int:
626-
"""Returns the number of available shifts."""
625+
def shifts_taken(self) -> int:
626+
"""Returns the number of taken shifts that are not for sale."""
627627
return self.team_members.filter(teamshiftassignment__for_sale=False).count()

src/teams/templates/team_shift_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ <h4>
8686
<i class="fas fa-thumbs-down"></i> Make available
8787
</a>
8888
{% endif %}
89-
{% elif shift.people_required > shift.shifts_available %}
89+
{% elif shift.people_required > shift.shifts_taken %}
9090
<a class="btn btn-success"
9191
href="{% url 'teams:shift_member_take' camp_slug=camp.slug team_slug=team.slug pk=shift.pk %}">
9292
<i class="fas fa-thumbs-up"></i> Assign me

0 commit comments

Comments
 (0)