Skip to content

Commit d75afa7

Browse files
committed
OpenConceptLab/ocl_issues#2163 | Cheaper way to get list of locales for a repo
1 parent f9df4d6 commit d75afa7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/common/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,9 @@ def concept_names_distribution(self):
11611161
def get_name_locale_distribution(self):
11621162
return self._get_distribution(self.get_name_locales_queryset(), 'locale')
11631163

1164+
def get_name_locale_list_distribution(self):
1165+
return self.get_concepts_queryset().distinct('names__locale').values_list('names__locale', flat=True)
1166+
11641167
def get_name_type_distribution(self):
11651168
return self._get_distribution(self.get_name_locales_queryset(), 'type')
11661169

0 commit comments

Comments
 (0)