feat(devops): Add migration to signal

ref: #807 #515 #809
This commit is contained in:
2025-06-09 17:02:15 +09:30
parent 2cb334f25f
commit 8f0a5386af

View File

@ -89,6 +89,12 @@ def centurion_model_migrate(sender, **kwargs):
'history_model_name': 'GitGroupHistory',
'notes_model_name': 'GitGroupNotes'
},
{
'app_label': 'devops',
'model_name': 'GitRepository',
'history_model_name': None,
'notes_model_name': None
},
{
'app_label': 'devops',
'model_name': 'GitHubRepository',
@ -189,13 +195,13 @@ def centurion_model_migrate(sender, **kwargs):
if getattr(model, '_notes_enabled', False):
if notes_model_name is None:
raise LookupError('No notes model to migrate')
try:
if notes_model_name is None:
raise LookupError('No notes model to migrate')
original_notes = apps.get_model(
app_label = app_label,
model_name = notes_model_name