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
Political Memory
memopol
Commits
391b04aa
Commit
391b04aa
authored
Sep 05, 2016
by
Nicolas Joyard
Browse files
Fix migration not truncating titles correctly
parent
a9d88685
Changes
1
Hide whitespace changes
Inline
Side-by-side
representatives_positions/migrations/0005_set_title.py
View file @
391b04aa
...
...
@@ -14,7 +14,7 @@ def set_titles(apps, schema_editor):
for
pos
in
Position
.
objects
.
all
():
lines
=
pos
.
text
.
split
(
'
\n
'
)
if
len
(
lines
)
>
1
:
pos
.
title
=
lines
[
0
]
pos
.
title
=
lines
[
0
]
[
0
:
500
]
pos
.
save
()
...
...
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