Commit 55e86001 authored by Birin Sanchez's avatar Birin Sanchez
Browse files

process_bundle_changes: Avoid crash when the user has no

Select active users only.
Signed-off-by: Birin Sanchez's avatarBirin Sanchez <>
parent 6f2791dc
Pipeline #18431 passed with stage
in 30 seconds
......@@ -130,7 +130,7 @@ def process_bundle_changes():
# We get all pending BundleChanges in reverse order ("-id") so we
# process the most recent ones earlier.
pending_changes = BundleChange.objects.filter(
for pending_change in pending_changes:
is_active = False
......@@ -138,6 +138,11 @@ def process_bundle_changes():
# Check if the subscription is active
subs = get_user_subscriptions(pending_change.user)
if subs is None:'User {} has no subscriptions. BundleChange cannot be '
for sub in subs:
order_id = sub.get('parent_id', -1)
sub_status = sub.get('status', '')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment