15815 review fixes

This commit is contained in:
Arthur 2024-04-26 13:08:23 -07:00
parent fde580807b
commit d3c77fc67f
1 changed files with 1 additions and 3 deletions

View File

@ -8,9 +8,7 @@ def update_dashboard_widgets(apps, schema_editor):
for dashboard in Dashboard.objects.all():
for key, widget in dashboard.config.items():
breakpoint()
if 'models' in widget['config']:
models = widget['config']['models']
if models := widget['config'].get('models'):
models = list(map(lambda x: x.replace('users.netboxgroup', 'users.group'), models))
models = list(map(lambda x: x.replace('users.netboxuser', 'users.user'), models))
dashboard.config[key]['config']['models'] = models