Commits

Dimitris Glezos  committed ccf6148

Fixed release details list not showing stats.

Be careful with get_model. It sometimes returns None and screws up
everything.

  • Participants
  • Parent commits 8937518

Comments (0)

Files changed (1)

File transifex/releases/models.py

 from django.utils.html import escape
 
 from languages.models import Language
-
-Translation = get_model('resources', 'Translation')
-SourceEntity = get_model('resources', 'SourceEntity')
+from resources.models import Translation, SourceEntity
 
 from txcommon.log import logger, log_model
 
         this Release.
         """
         language_ids = Translation.objects.filter(
-            resource__releases=self).values_list(
+            resource__in=self.resources.all).values_list(
             'language', flat=True).distinct()
         return Language.objects.filter(id__in=language_ids).distinct()