feat(itam): Add DeviceType for history and notes data migration

ref:#817 #803
This commit is contained in:
2025-06-11 15:57:46 +09:30
parent 69e6177700
commit 306d4b5b7a

View File

@ -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: