From bbf0813df1e777234714cff9bf0ffbe0847c2c0c Mon Sep 17 00:00:00 2001 From: Zach Waterfield Date: Fri, 11 Oct 2024 09:46:11 -0400 Subject: [PATCH] Put back license endpoint billing manager --- ee/api/billing.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ee/api/billing.py b/ee/api/billing.py index 6426ec5d7e624..8b7691be5e50a 100644 --- a/ee/api/billing.py +++ b/ee/api/billing.py @@ -319,10 +319,9 @@ def license(self, request: Request, *args: Any, **kwargs: Any) -> HttpResponse: return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) license = License(key=serializer.validated_data["license"]) - billing_manager = self.get_billing_manager() res = requests.get( f"{BILLING_SERVICE_URL}/api/billing", - headers=billing_manager.get_auth_headers(organization), + headers=BillingManager(license).get_auth_headers(organization), ) if res.status_code != 200: @@ -332,7 +331,7 @@ def license(self, request: Request, *args: Any, **kwargs: Any) -> HttpResponse: } ) data = res.json() - billing_manager.update_license_details(data) + BillingManager(license).update_license_details(data) return Response({"success": True}) def _get_org(self) -> Optional[Organization]: