mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-27 02:43:01 +00:00
Merge branch 'SogeNotForMembership' into 'main'
Soge not for membership See merge request bde/nk20!202
This commit is contained in:
commit
eb355f547c
@ -329,17 +329,18 @@ class SogeCredit(models.Model):
|
|||||||
bde_qs = Membership.objects.filter(user=self.user, club=bde, date_start__gte=bde.membership_start)
|
bde_qs = Membership.objects.filter(user=self.user, club=bde, date_start__gte=bde.membership_start)
|
||||||
kfet_qs = Membership.objects.filter(user=self.user, club=kfet, date_start__gte=kfet.membership_start)
|
kfet_qs = Membership.objects.filter(user=self.user, club=kfet, date_start__gte=kfet.membership_start)
|
||||||
|
|
||||||
if bde_qs.exists():
|
## Soge do not pay BDE and kfet memberships this year (2022-2023)
|
||||||
m = bde_qs.get()
|
# if bde_qs.exists():
|
||||||
if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
# m = bde_qs.get()
|
||||||
if m.transaction not in self.transactions.all():
|
# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||||
self.transactions.add(m.transaction)
|
# if m.transaction not in self.transactions.all():
|
||||||
|
# self.transactions.add(m.transaction)
|
||||||
if kfet_qs.exists():
|
#
|
||||||
m = kfet_qs.get()
|
# if kfet_qs.exists():
|
||||||
if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
# m = kfet_qs.get()
|
||||||
if m.transaction not in self.transactions.all():
|
# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||||
self.transactions.add(m.transaction)
|
# if m.transaction not in self.transactions.all():
|
||||||
|
# self.transactions.add(m.transaction)
|
||||||
|
|
||||||
if 'wei' in settings.INSTALLED_APPS:
|
if 'wei' in settings.INSTALLED_APPS:
|
||||||
from wei.models import WEIClub
|
from wei.models import WEIClub
|
||||||
|
@ -23,7 +23,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
{{ profile_form|crispy }}
|
{{ profile_form|crispy }}
|
||||||
{{ soge_form|crispy }}
|
{% comment "Soge not for membership (only WEI)" %} {{ soge_form|crispy }} {% endcomment %}
|
||||||
<button class="btn btn-success" type="submit">
|
<button class="btn btn-success" type="submit">
|
||||||
{% trans "Sign up" %}
|
{% trans "Sign up" %}
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user