Skip to content

Commit 35e766b

Browse files
committed
Apply suggestions from @cslzchen
Co-authored-by: Longze Chen <cslzchen@gmail.com>
1 parent c08d55a commit 35e766b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/remove_after_use/merge_notification_subscription_provider_ct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ def merge_notification_subscription_provider_ct():
2727

2828
provider_ct_ids = [ct.id for ct in provider_ct_list]
2929

30-
abstract_qs = NotificationSubscription.objects.filter(
30+
abstract_provider_ct_qs = NotificationSubscription.objects.filter(
3131
content_type=abstract_provider_ct
3232
)
3333

3434
duplicates = NotificationSubscription.objects.filter(
3535
content_type_id__in=provider_ct_ids
3636
).annotate(
3737
abstract_exists=Exists(
38-
abstract_qs.filter(
38+
abstract_provider_ct_qs.filter(
3939
notification_type_id=OuterRef('notification_type_id'),
4040
user_id=OuterRef('user_id'),
4141
object_id=OuterRef('object_id'),

0 commit comments

Comments
 (0)