1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2025-06-30 02:01:07 +02:00

Merge branch 'l_eveil_du_nanax' into 'master'

L'eveil du nanax

See merge request bde/nk20-scripts!2
This commit is contained in:
bleizi
2023-07-13 19:48:50 +02:00
14 changed files with 46 additions and 67 deletions

View File

@ -3,32 +3,30 @@
import psycopg2 as pg
import psycopg2.extras as pge
import datetime
import copy
from django.utils.timezone import make_aware
from activity.models import Activity, ActivityType, Entry, Guest
from django.db import transaction
from activity.models import ActivityType, Activity, Guest, Entry
from django.utils.timezone import make_aware
from member.models import Club
from note.models import Note, NoteUser
from ._import_utils import ImportCommand, BulkCreateManager, timed
from ._import_utils import BulkCreateManager, ImportCommand, timed
MAP_ACTIVITY = dict()
CLUB_RELOU = [
0, # BDE
4771, # Kataclist
5162, # Assurance BDE ?!
5164, # S & L
0, # BDE
4771, # Kataclist
5162, # Assurance BDE ?!
5164, # S & L
625, # Aspique
5154, # Frekens
3944, # DiskJok[ENS]
5153, # Monopo[list]
2351, # JdRM
2365, # Pot Vieux
5154, # Frekens
3944, # DiskJok[ENS]
5153, # Monopo[list]
2351, # JdRM
2365, # Pot Vieux
]
class Command(ImportCommand):
"""
Import command for Activities Base Data (Comptes, and Aliases)
@ -50,7 +48,7 @@ class Command(ImportCommand):
row["responsable"] = 3508
note = self.MAP_IDBDE[row["responsable"]]
if note == 6244:
# Licorne magique ne doit pas utiliser son compte club pour proposer des activités
# Licorne magique ne doit pas utiliser son compte club pour proposer des activités
note = Note.objects.get(pk=self.MAP_IDBDE[6524])
note = note.id
organizer = Club.objects.filter(name=row["signature"])