diff --git a/api/organisations/subscriptions/metadata.py b/api/organisations/subscriptions/metadata.py index f897a3a01880..c6308892be2e 100644 --- a/api/organisations/subscriptions/metadata.py +++ b/api/organisations/subscriptions/metadata.py @@ -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 diff --git a/api/tests/unit/organisations/chargebee/test_unit_chargebee_cache.py b/api/tests/unit/organisations/chargebee/test_unit_chargebee_cache.py index 333a22940472..119b09b612d7 100644 --- a/api/tests/unit/organisations/chargebee/test_unit_chargebee_cache.py +++ b/api/tests/unit/organisations/chargebee/test_unit_chargebee_cache.py @@ -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 = [ @@ -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 = [