Skip to content

Commit

Permalink
15815 review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arthanson committed Apr 26, 2024
1 parent fde5808 commit d3c77fc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions netbox/extras/migrations/0115_convert_dashboard_widgets.py
Expand Up @@ -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
Expand Down

0 comments on commit d3c77fc

Please sign in to comment.