Skip to content
GitLab
Explore
Sign in
Commits on Source (3)
I am an idiot
· b9ae7010
ynerant
authored
Aug 01, 2020
b9ae7010
I am a big idiot
· dd812e09
ynerant
authored
Aug 01, 2020
dd812e09
Parent club id is the id and not the club
· e16629cc
ynerant
authored
Aug 01, 2020
e16629cc
Hide whitespace changes
Inline
Side-by-side
management/commands/import_account.py
View file @
e16629cc
...
...
@@ -151,7 +151,7 @@ class Command(ImportCommand):
"
pk
"
:
pk_club
,
"
name
"
:
row
[
"
pseudo
"
],
"
email
"
:
row
[
"
mail
"
],
"
parent_club
"
:
1
,
# All clubs depends on BDE by default
"
parent_club
_id
"
:
1
,
# All clubs depends on BDE by default
"
membership_duration
"
:
M_DURATION
,
"
membership_start
"
:
M_START
,
"
membership_end
"
:
M_END
,
...
...
@@ -170,16 +170,15 @@ class Command(ImportCommand):
}
note_dict
[
"
created_at
"
]
=
make_aware
(
row
[
"
previous_report_date
"
])
# Not perfect, but good approximation
note_dict
[
"
polymorphic_ctype
"
]
=
note_club_type
#
bulk_mgr.add(Club(**obj_dict),
#
Note(**note_dict),
#
NoteClub(**note_club_dict),
#
Alias(**alias_dict))
bulk_mgr
.
add
(
Club
(
**
obj_dict
),
Note
(
**
note_dict
),
NoteClub
(
**
note_club_dict
),
Alias
(
**
alias_dict
))
pk_club
+=
1
# row import completed
MAP_IDBDE
[
row
[
"
idbde
"
]]
=
pk_note
pk_note
+=
1
bulk_mgr
.
done
()
exit
(
0
)
@timed
def
import_alias
(
self
,
cur
,
chunk_size
):
...
...