lingo: fix migration (#77745) #100

Merged
lguerin merged 1 commits from wip/77745-fix-lingo-migration into main 2023-05-21 16:30:58 +02:00
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ def forwards(apps, schema_editor):
# update page's related_cells cache
if 'lingo_invoicescell' not in new_cell.page.related_cells.get('cell_types', []):
if not new_cell.page.related_cells.get('cell_types'):
new_cell.page.related_cells['cell_types'] = []
new_cell.page.related_cells['cell_types'].append('lingo_invoicescell')
new_cell.page.save()
@ -63,6 +65,8 @@ def forwards(apps, schema_editor):
# update page's related_cells cache
if 'lingo_invoicescell' not in new_cell.page.related_cells.get('cell_types', []):
if not new_cell.page.related_cells.get('cell_types'):
new_cell.page.related_cells['cell_types'] = []
new_cell.page.related_cells['cell_types'].append('lingo_invoicescell')
new_cell.page.save()