Skip to content

Commit

Permalink
Allow unknown attrs from cb json meta
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell committed Aug 19, 2024
1 parent 174d437 commit bd37a87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/organisations/subscriptions/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def __init__(
api_calls: int = 0,
projects: typing.Optional[int] = None,
chargebee_email=None,
**kwargs, # allows for extra unknown attrs from CB json metadata
):
self.seats = seats
self.api_calls = api_calls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_chargebee_cache(mocker, db):
"seats": 10,
"api_calls": 100,
"projects": 10,
"some_unknown_key": 1,
}
plan_id = "plan_id"
plan_items = [
Expand All @@ -69,6 +70,7 @@ def test_chargebee_cache(mocker, db):
"seats": 1,
"api_calls": 10,
"projects": 1,
"some_unknown_key": 1,
}
addon_id = "addon_id"
addon_items = [
Expand Down

0 comments on commit bd37a87

Please sign in to comment.