Skip to content

Commit 24e1794

Browse files
committed
feat(itim): Add model Cluster to migrate for history and notes
ref: #824 closes #825
1 parent 4e728df commit 24e1794

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

app/core/signal/centurion_model_migrate.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ def centurion_model_migrate(sender, **kwargs):
154154
'model_name': 'SoftwareVersion',
155155
'history_model_name': 'SoftwareVersionHistory',
156156
'notes_model_name': 'SoftwareVersionNotes'
157+
},
158+
{
159+
'app_label': 'itim',
160+
'model_name': 'Cluster',
161+
'history_model_name': 'ClusterHistory',
162+
'notes_model_name': 'ClusterNotes'
157163
}
158164
]
159165

@@ -201,7 +207,7 @@ def centurion_model_migrate(sender, **kwargs):
201207
model_name = model.get_history_model_name( model )
202208
)
203209

204-
history = original_history.objects.all()
210+
history = original_history.objects.filter().exclude( user = None )
205211

206212
print(f' Found {len(history)} history entries to migrate.')
207213

0 commit comments

Comments
 (0)