code cleaning
This commit is contained in:
parent
11e6bd9720
commit
996ac3c337
|
@ -10,7 +10,6 @@ from django.contrib.auth.models import User
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
|
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.db import IntegrityError
|
|
||||||
|
|
||||||
from note.models import Note, NoteUser, NoteClub
|
from note.models import Note, NoteUser, NoteClub
|
||||||
from note.models import Alias
|
from note.models import Alias
|
||||||
|
|
|
@ -333,7 +333,7 @@ def import_activities(cur):
|
||||||
update_line(idx, n, row["alias"])
|
update_line(idx, n, row["alias"])
|
||||||
organizer = Club.objects.filter(name=row["signature"])
|
organizer = Club.objects.filter(name=row["signature"])
|
||||||
if organizer.exists():
|
if organizer.exists():
|
||||||
# Try to find the club that organizes the activity. If not founded, assume it's Kfet (fix manually)
|
# Try to find the club that organizes the activity. If not found, assume it's Kfet (fix manually)
|
||||||
organizer = organizer.get()
|
organizer = organizer.get()
|
||||||
else:
|
else:
|
||||||
organizer = kfet
|
organizer = kfet
|
||||||
|
@ -347,7 +347,7 @@ def import_activities(cur):
|
||||||
"date_start": row["debut"],
|
"date_start": row["debut"],
|
||||||
"date_end": row["fin"],
|
"date_end": row["fin"],
|
||||||
"valid": row["validepar"] is not None,
|
"valid": row["validepar"] is not None,
|
||||||
"open": row["open"], # Should be always False
|
"open": row["open"], # Should always be False
|
||||||
}
|
}
|
||||||
# WARNING: Fields lieu, liste, listeimprimee are missing
|
# WARNING: Fields lieu, liste, listeimprimee are missing
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue