Skip to content

Commit 87c90fa

Browse files
committed
ref(crons): Set null for owner_user_id when a user is deleted
1 parent f5b0e32 commit 87c90fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sentry/monitors/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class Monitor(Model):
251251
Type of monitor. Currently there are only CRON_JOB monitors.
252252
"""
253253

254-
owner_user_id = HybridCloudForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete="CASCADE")
254+
owner_user_id = HybridCloudForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete="SET_NULL")
255255
"""
256256
The user assigned as the owner of this model.
257257
"""

0 commit comments

Comments
 (0)