mirror of https://gitlab.crans.org/bde/nk20
🐛 Minor fixes
This commit is contained in:
parent
f0bca69825
commit
18bdc8044b
|
@ -147,7 +147,7 @@ class BusTable(tables.Table):
|
||||||
return ", ".join(team.name for team in value.order_by('name').all())
|
return ", ".join(team.name for team in value.order_by('name').all())
|
||||||
|
|
||||||
def render_count(self, value):
|
def render_count(self, value):
|
||||||
return str(value) + " " + (str(_("members")) if value > 0 else str(_("member")))
|
return str(value) + " " + (str(_("members")) if value > 1 else str(_("member")))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
attrs = {
|
attrs = {
|
||||||
|
@ -178,7 +178,7 @@ class BusTeamTable(tables.Table):
|
||||||
)
|
)
|
||||||
|
|
||||||
def render_count(self, value):
|
def render_count(self, value):
|
||||||
return str(value) + " " + (str(_("members")) if value > 0 else str(_("member")))
|
return str(value) + " " + (str(_("members")) if value > 1 else str(_("member")))
|
||||||
|
|
||||||
count = tables.Column(
|
count = tables.Column(
|
||||||
verbose_name=_("Members count"),
|
verbose_name=_("Members count"),
|
||||||
|
|
|
@ -177,7 +177,7 @@ class WEIMembershipsView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTableVi
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_queryset(self, **kwargs):
|
def get_queryset(self, **kwargs):
|
||||||
qs = super().get_queryset(**kwargs).filter(club=self.club)
|
qs = super().get_queryset(**kwargs).filter(club=self.club).distinct()
|
||||||
|
|
||||||
pattern = self.request.GET.get("search", "")
|
pattern = self.request.GET.get("search", "")
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ class WEIRegistrationsView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTable
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_queryset(self, **kwargs):
|
def get_queryset(self, **kwargs):
|
||||||
qs = super().get_queryset(**kwargs).filter(wei=self.club, membership=None)
|
qs = super().get_queryset(**kwargs).filter(wei=self.club, membership=None).distinct()
|
||||||
|
|
||||||
pattern = self.request.GET.get("search", "")
|
pattern = self.request.GET.get("search", "")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue