forked from 0x2620/pandora
fix migration
This commit is contained in:
parent
03b53b4765
commit
74407183ac
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ def migrate_texts(apps, schema_editor):
|
||||||
d.data['text'] = t.text
|
d.data['text'] = t.text
|
||||||
d.data['embeds'] = t.embeds
|
d.data['embeds'] = t.embeds
|
||||||
d.save()
|
d.save()
|
||||||
if t.type == 'pdf':
|
if t.type == 'pdf' and t.file:
|
||||||
d.file.name = path(d, 'data.pdf')
|
d.file.name = path(d, 'data.pdf')
|
||||||
os.makedirs(os.path.dirname(d.file.path))
|
os.makedirs(os.path.dirname(d.file.path))
|
||||||
shutil.copy2(t.file.path, d.file.path)
|
shutil.copy2(t.file.path, d.file.path)
|
||||||
|
|
Loading…
Reference in a new issue