dashboard: adapt tile creation to cell base being a concrete class (#17645)
This commit is contained in:
parent
3aba43b569
commit
84bb64e877
|
@ -26,6 +26,7 @@ def get_cell_data(cell):
|
|||
if cell is None:
|
||||
return {}
|
||||
cell_data = serializers.serialize('python', [cell])[0]
|
||||
cell_data['fields'].update(serializers.serialize('python', [cell.cellbase_ptr])[0]['fields'])
|
||||
del cell_data['pk']
|
||||
for key in ('restricted_to_unlogged', 'groups', 'last_update_timestamp',
|
||||
'order', 'placeholder', 'public', 'page'):
|
||||
|
|
|
@ -59,6 +59,7 @@ class DashboardAddTileView(View):
|
|||
if not cell.is_visible(request.user):
|
||||
raise PermissionDenied()
|
||||
cell.pk = None
|
||||
cell.id = None
|
||||
cell.page = dashboard.page
|
||||
cell.placeholder = '_dashboard'
|
||||
cell.save()
|
||||
|
|
Loading…
Reference in New Issue