Skip to content

Commit

Permalink
Fix #1317 As a subscriber I can't see old archived plans which don't …
Browse files Browse the repository at this point in the history
…have a pricelist attached
  • Loading branch information
chrisjsimpson committed Mar 10, 2024
1 parent 9180d54 commit a5cf46e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions subscribie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ def start_session():
log.debug(
f"Created PriceList with zero rules for currency {currency}"
)
# Ensure every plan has a PriceList attached for each supported currency
plans = Plan.query.all()
# Ensure every plan (including archived) has a PriceList attached
# for each supported currency
# https://github.com/Subscribie/subscribie/issues/1317
plans = Plan.query.execution_options(include_archived=True).all()
price_lists = (
PriceList.query.all()
) # TODO only get default pricelist for given currency
Expand Down
1 change: 0 additions & 1 deletion subscribie/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ def __getattribute__(self, name):
"""
if super(Plan, self).__getattribute__(name) is None:
log.warning(f"trial_period_days is none for plan {self.title}")
breakpoint()
return super(Plan, self).__getattribute__(name) or 0
return super(Plan, self).__getattribute__(name)

Expand Down

0 comments on commit a5cf46e

Please sign in to comment.