From 826ad05ce63bcf2097b2616880ea6bae3617dd8a Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Wed, 22 Jul 2026 16:44:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8(backend)=20assign=20the=20quota=20?= =?UTF-8?q?with=20a=20walrus=20operator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply a review suggestion to keep the quota lookup and its guard on a single line in the entitlements endpoint. --- src/backend/core/api/viewsets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/core/api/viewsets.py b/src/backend/core/api/viewsets.py index c83708ba..bf9d6ba1 100644 --- a/src/backend/core/api/viewsets.py +++ b/src/backend/core/api/viewsets.py @@ -2468,8 +2468,7 @@ class EntitlementsViewset(viewsets.ViewSet): method = getattr(entitlements_backend, method_name) if callable(method): entitlements[method_name] = method(request.user) - quota = entitlements_backend.get_quota(request.user) - if quota: + if quota := entitlements_backend.get_quota(request.user): entitlements["quota"] = quota entitlements["context"] = entitlements_backend.get_context(request.user) return drf.response.Response(entitlements)