##// END OF EJS Templates
Only aliases in default locale can be added to favorites
neko259 -
r1875:287c7c23 default
parent child Browse files
Show More
@@ -1,6 +1,7 b''
1 1 from boards import settings
2 2 from boards.models import Tag
3 3 from boards.models.thread import FAV_THREAD_NO_UPDATES
4 from boards.models.tag import DEFAULT_LOCALE
4 5
5 6 MAX_TRIPCODE_COLLISIONS = 50
6 7
@@ -78,7 +79,8 b' class SettingsManager:'
78 79 tag_names = self.get_setting(SETTING_FAVORITE_TAGS)
79 80 tags = []
80 81 if tag_names:
81 tags = list(Tag.objects.filter(aliases__name__in=tag_names))
82 tags = list(Tag.objects.filter(aliases__name__in=tag_names,
83 aliases__locale=DEFAULT_LOCALE))
82 84 return tags
83 85
84 86 def add_fav_tag(self, tag):
@@ -102,7 +104,8 b' class SettingsManager:'
102 104 tag_names = self.get_setting(SETTING_HIDDEN_TAGS)
103 105 tags = []
104 106 if tag_names:
105 tags = list(Tag.objects.filter(aliases__name__in=tag_names))
107 tags = list(Tag.objects.filter(aliases__name__in=tag_names,
108 aliases__locale=DEFAULT_LOCALE))
106 109
107 110 return tags
108 111
General Comments 0
You need to be logged in to leave comments. Login now