feat(itam): Add DeviceType for history and notes data migration
ref:#817 #803
This commit is contained in:
@ -118,6 +118,12 @@ def centurion_model_migrate(sender, **kwargs):
|
||||
'model_name': 'DeviceModel',
|
||||
'history_model_name': 'DeviceModelHistory',
|
||||
'notes_model_name': 'DeviceModelNotes'
|
||||
},
|
||||
{
|
||||
'app_label': 'itam',
|
||||
'model_name': 'DeviceType',
|
||||
'history_model_name': 'DeviceTypeHistory',
|
||||
'notes_model_name': 'DeviceTypeNotes'
|
||||
}
|
||||
]
|
||||
|
||||
@ -198,7 +204,9 @@ def centurion_model_migrate(sender, **kwargs):
|
||||
print(f' Removed {history_model_name}={id} from database.')
|
||||
|
||||
except Exception as e:
|
||||
print(f" Exception {e.__class__.__name__} occured:"+"\n "+f'{e}')
|
||||
print(
|
||||
f" Exception {e.__class__.__name__} occured:"+"\n" \
|
||||
" "+f'{e}')
|
||||
|
||||
|
||||
except LookupError as e:
|
||||
|
Reference in New Issue
Block a user