Skip to content

Commit

Permalink
Fix #1330 ignore archived subscribers when showing Recent Subscriptio…
Browse files Browse the repository at this point in the history
…n Cancellations
  • Loading branch information
chrisjsimpson committed May 2, 2024
1 parent 142a1bf commit e993156
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions subscribie/blueprints/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,13 @@ def show_recent_subscription_cancellations():
.filter_by(uuid=value.data.object.metadata.person_uuid)
.one()
)
if person is None:
log.info(
f"""Person query retruned None- probably archived.\n
Skipping Person with uuid {value.data.object.metadata.person_uuid}"""
)
continue

# Get Subscription
subscription = (
Subscription.query.execution_options(include_archived=True)
Expand Down

0 comments on commit e993156

Please sign in to comment.