From 9516d1dbeaedafd6763a6e0aea85163f76282dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 13 Jun 2017 11:04:21 +0200 Subject: [PATCH] Trying to fix problem with get_object with selector --- taiga/projects/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/taiga/projects/api.py b/taiga/projects/api.py index ad43b052..99ca236f 100644 --- a/taiga/projects/api.py +++ b/taiga/projects/api.py @@ -1044,3 +1044,8 @@ class GameViewSet(OCCResourceMixin, ModelCrudViewSet): if "selector" in kwargs: (kwargs['project__slug'], kwargs['uuid']) = kwargs.pop('selector').split("/") return super().dispatch(request, *args, **kwargs) + + def get_object(self, queryset=None): + queryset = self.filter_queryset(self.get_queryset()) + obj = get_object_or_404(queryset, **self.kwargs) + return obj