Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
bc63d378
Unverified
Commit
bc63d378
authored
Nov 23, 2016
by
Thom Wiggers
📐
Browse files
Fix migrating until
parent
0dc174b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/education/management/commands/migrateeducation.py
View file @
bc63d378
...
...
@@ -72,7 +72,8 @@ class Command(legacylogin.Command):
course
.
ec
=
int
(
src
[
'e_c_t_s'
])
course
.
period
=
src
[
'quarter'
].
replace
(
' en '
,
' & '
)
course
.
since
=
src
[
'since'
]
course
.
until
=
src
[
'until'
]
if
src
[
'until'
]
!=
0
else
None
if
int
(
src
[
'until'
])
!=
0
:
course
.
until
=
src
[
'until'
]
course
.
save
()
for
id
in
src
[
'categories'
]:
...
...
website/events/management/commands/migrateevents.py
View file @
bc63d378
...
...
@@ -101,6 +101,8 @@ class Command(BaseCommand):
print
(
'[!]Could neither find {} nor {}'
.
format
(
django_field
,
django_multilingualfield
))
return
if
django_field
==
'title'
:
django_field
=
django_field
[:
100
]
setattr
(
new_event
,
django_multilingualfield
,
concrete_data
)
...
...
@@ -133,8 +135,8 @@ class Command(BaseCommand):
events_models
.
RegistrationInformationField
(
# TODO: UGLY AF
name_en
=
field_data
[
'field_name'
],
name_nl
=
field_data
[
'field_name'
],
name_en
=
field_data
[
'field_name'
]
[:
100
]
,
name_nl
=
field_data
[
'field_name'
]
[:
100
]
,
description_en
=
field_data
[
'field_explanation'
],
description_nl
=
field_data
[
'field_explanation'
],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment