File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def get_queryset(self):
49
49
50
50
if self .kwargs .get ('tag' ):
51
51
self .tag = get_object_or_404 (Tag , slug = self .kwargs .get ('tag' ))
52
- queryset = queryset .filter (tags__name__in = [self .tag .slug ])
52
+ queryset = queryset .filter (tags__slug__in = [self .tag .slug ])
53
53
else :
54
54
self .tag = None
55
55
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ class TestBadges(TestCase):
426
426
427
427
# To set `flat` as default style as done in code.
428
428
def get_badge_path (self , version , style = 'flat' ):
429
- return static (self .BADGE_PATH % (version , style ))
429
+ return static (self .BADGE_PATH % (version , style ))
430
430
431
431
def setUp (self ):
432
432
self .BADGE_PATH = 'projects/badges/%s-%s.svg'
@@ -462,3 +462,11 @@ def test_social_passing_badge(self):
462
462
res = self .client .get (self .badge_url , {'version' : self .version .slug , 'style' : 'social' })
463
463
static_badge = self .get_badge_path ('passing' , 'social' )
464
464
self .assertEquals (res .url , static_badge )
465
+
466
+
467
+ class TestTags (TestCase ):
468
+ def test_project_filtering_work_with_tags_with_space_in_name (self ):
469
+ pip = get (Project , slug = 'pip' )
470
+ pip .tags .add ('tag with space' )
471
+ response = self .client .get ('/projects/tags/tag-with-space/' )
472
+ self .assertContains (response , '"/projects/pip/"' )
You can’t perform that action at this time.
0 commit comments