Skip to content

Commit

Permalink
Subscription: Check account.internal exists before accessing it
Browse files Browse the repository at this point in the history
account.internal might be None, in which case the check for '*' in
account.internal errors out. Adding a check prior to that to check that
account.internal is not None.
  • Loading branch information
rdimaio authored and bari12 committed Apr 26, 2024
1 parent a542f64 commit 4b84dee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rucio/core/subscription.py
Expand Up @@ -229,7 +229,7 @@ def list_subscriptions(name: "Optional[str]" = None,
if name:
query = query.filter_by(name=name)
if account:
if '*' in account.internal:
if account.internal is not None and '*' in account.internal:
account_str = account.internal.replace('*', '%')
query = query.filter(models.Subscription.account.like(account_str))
else:
Expand Down

0 comments on commit 4b84dee

Please sign in to comment.