feat(itim): Add model Cluster to migrate for history and notes

ref: #824 closes #825
This commit is contained in:
2025-06-13 12:20:41 +09:30
parent 1b875233da
commit 44489b308b

View File

@ -154,6 +154,12 @@ def centurion_model_migrate(sender, **kwargs):
'model_name': 'SoftwareVersion',
'history_model_name': 'SoftwareVersionHistory',
'notes_model_name': 'SoftwareVersionNotes'
},
{
'app_label': 'itim',
'model_name': 'Cluster',
'history_model_name': 'ClusterHistory',
'notes_model_name': 'ClusterNotes'
}
]
@ -201,7 +207,7 @@ def centurion_model_migrate(sender, **kwargs):
model_name = model.get_history_model_name( model )
)
history = original_history.objects.all()
history = original_history.objects.filter().exclude( user = None )
print(f' Found {len(history)} history entries to migrate.')