Skip to content
Snippets Groups Projects
Commit 4984159a authored by ynerant's avatar ynerant
Browse files

Improve activity interface

parent 3806feb6
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,8 @@ class Command(ImportCommand):
cur.execute("SELECT * FROM activites ORDER by id")
n = cur.rowcount
bulk_mgr = BulkCreateManager(chunk_size=chunk)
activity_type_id = ActivityType.objects.get(name="Pot").pk # Need to be fixed manually
pot_id = ActivityType.objects.get(name="Pot").pk
club_id = ActivityType.objects.get(name="Soirée de club").pk
kfet = Club.objects.get(name="Kfet")
pk_activity = 1
for idx, row in enumerate(cur):
......@@ -64,7 +65,7 @@ class Command(ImportCommand):
"name": row["titre"],
"description": row["description"],
"location": row["lieu"],
"activity_type_id": activity_type_id, # By default Pot
"activity_type_id": pot_id if row["liste"] else club_id,
"creater_id": NoteUser.objects.get(pk=note).user.id,
"organizer_id": organizer.pk,
"attendees_club_id": kfet.pk, # Maybe fix manually
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment