Skip to content

Commit 10c0cde

Browse files
committed
[fix] Fixed 0060_cleanup_api_task_notification_types (missing dep)
This migration lacked an explicit dependency on the notifications module's migrations, which could cause it to run before the NotificationSetting model is available, resulting in a crash.
1 parent d5bc8a1 commit 10c0cde

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

openwisp_controller/config/migrations/0060_cleanup_api_task_notification_types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def cleanup_api_task_notification_types(apps, schema_editor):
88
return
99
Notification = apps.get_model("openwisp_notifications", "Notification")
1010
NotificationSetting = apps.get_model(
11-
"openwisp_notifications", "NotificationSetting"
11+
"openwisp_notifications", "NotificationSetting", require_ready=True
1212
)
1313
NotificationSetting.objects.filter(
1414
type__in=["api_task_error", "api_task_recovery"]
@@ -22,6 +22,10 @@ class Migration(migrations.Migration):
2222

2323
dependencies = [
2424
("config", "0059_zerotier_templates_ow_zt_to_global"),
25+
(
26+
"openwisp_notifications",
27+
"0009_alter_notificationsetting_organization_and_more",
28+
),
2529
]
2630

2731
operations = [

0 commit comments

Comments
 (0)