Skip to content

Commit

Permalink
fix: when fetching licenses, return revoked/expired (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz authored Nov 19, 2024
1 parent bcf3d7a commit d134f53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion enterprise_access/apps/api_client/license_manager_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class LicenseManagerUserApiClient(BaseUserApiClient):
def auto_apply_license_endpoint(self, customer_agreement_uuid):
return f"{self.api_base_url}customer-agreement/{customer_agreement_uuid}/auto-apply/"

def get_subscription_licenses_for_learner(self, enterprise_customer_uuid):
def get_subscription_licenses_for_learner(self, enterprise_customer_uuid, **kwargs):
"""
Get subscription licenses for a learner.
Expand All @@ -89,6 +89,7 @@ def get_subscription_licenses_for_learner(self, enterprise_customer_uuid):
"""
query_params = {
'enterprise_customer_uuid': enterprise_customer_uuid,
**kwargs,
}
url = self.learner_licenses_endpoint
try:
Expand Down
4 changes: 3 additions & 1 deletion enterprise_access/apps/bffs/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def load_subscription_licenses(self):
"""
try:
subscriptions_result = self.license_manager_client.get_subscription_licenses_for_learner(
enterprise_customer_uuid=self.context.enterprise_customer_uuid
enterprise_customer_uuid=self.context.enterprise_customer_uuid,
include_revoked=True,
current_plans_only=False,
)
subscriptions_data = self.transform_subscriptions_result(subscriptions_result)
self.context.data['enterprise_customer_user_subsidies'].update({
Expand Down

0 comments on commit d134f53

Please sign in to comment.