Skip to content

Commit

Permalink
#16388: Fix migration bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Jun 17, 2024
1 parent 853d990 commit e12edd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/extras/migrations/0116_move_objectchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def update_dashboard_widgets(apps, schema_editor):

for dashboard in Dashboard.objects.all():
for key, widget in dashboard.config.items():
if getattr(widget['config'], 'model') == 'extras.objectchange':
if widget['config'].get('model') == 'extras.objectchange':
widget['config']['model'] = 'core.objectchange'
elif models := widget['config'].get('models'):
models = list(map(lambda x: x.replace('extras.objectchange', 'core.objectchange'), models))
Expand Down

0 comments on commit e12edd7

Please sign in to comment.