From 421e4a083fb0174e23a41e0a5847143901de731c Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Mon, 18 Aug 2025 15:43:30 +0300 Subject: [PATCH] Features: 1) Add `lookup_field` and `lookup_url_kwarg` to Category and Brand viewsets; Fixes: Extra: 1) No changes to existing logic; --- core/viewsets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/viewsets.py b/core/viewsets.py index 8c603d87..69250806 100644 --- a/core/viewsets.py +++ b/core/viewsets.py @@ -283,6 +283,8 @@ class CategoryViewSet(EvibesViewSet): action_serializer_classes = { "list": CategorySimpleSerializer, } + lookup_field = "lookup_value" + lookup_url_kwarg = "lookup_value" additional = {"seo_meta": "ALLOW"} def get_object(self): @@ -403,6 +405,8 @@ class BrandViewSet(EvibesViewSet): action_serializer_classes = { "list": BrandSimpleSerializer, } + lookup_field = "lookup_value" + lookup_url_kwarg = "lookup_value" additional = {"seo_meta": "ALLOW"} def get_object(self):