File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -306,10 +306,10 @@ def handle_metadata_tags(self, action):
306
306
tags .append ("Firefox %s" % version )
307
307
tags .append ("beta" )
308
308
309
- # Add a tag for the OS but only if it already exists as a tag.
309
+ # Add a tag for the OS but only if it already exists as a non-segmentation tag.
310
310
if os := self .metadata .get ("os" ):
311
311
try :
312
- os_tag = SumoTag .objects .get ( name__iexact = os )
312
+ os_tag = SumoTag .objects .non_segmentation_tags (). filter ( name__iexact = os ). get ( )
313
313
except SumoTag .DoesNotExist :
314
314
pass
315
315
else :
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ class SumoTagManager(models.Manager):
8
8
def segmentation_tags (self ):
9
9
return self .filter (is_archived = False , slug__startswith = "seg-" )
10
10
11
+ def non_segmentation_tags (self ):
12
+ return self .exclude (slug__startswith = "seg-" ).filter (is_archived = False )
13
+
11
14
def active (self ):
12
15
return self .filter (is_archived = False )
13
16
You can’t perform that action at this time.
0 commit comments