chore: commit qui sert à rien

This commit is contained in:
N3WT DE COMPET
2025-02-13 17:13:31 +01:00
parent 9bf9c5f62d
commit cce78355a3
17 changed files with 210 additions and 143 deletions

View File

@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand
from School.models import PaymentMode, PaymentModeType, FeeType
from School.models import PaymentMode, PaymentModeType, FeeType, Establishment
class Command(BaseCommand):
help = 'Initialize or update Payment Modes'
@ -8,6 +8,7 @@ class Command(BaseCommand):
self.create_or_update_payment_modes()
def create_or_update_payment_modes(self):
establishment = Establishment.objects.get(name="N3WT")
for fee_type in FeeType.choices:
fee_type_value = fee_type[0]
@ -18,7 +19,8 @@ class Command(BaseCommand):
mode=mode_value,
type=fee_type_value,
defaults={
'is_active': False
'is_active': False,
'establishment': establishment
}
)