lingo: fix migration (#77745) #100
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue