diff --git a/app/video/models.py b/app/video/models.py index 3b30a8a..644deac 100644 --- a/app/video/models.py +++ b/app/video/models.py @@ -4,6 +4,7 @@ import json from django.conf import settings from django.contrib.auth import get_user_model from django.db import models +from django.db.models import Q import ox @@ -32,7 +33,7 @@ class Film(models.Model): def related_texts(self): from ..text.models import Text - return Text.objects.filter(data__item=self.padma_id) + return Text.objects.filter(Q(data__item=self.padma_id) | Q(data__related=self.padma_id)) def duration(self): return ox.format_duration(self.data['duration'] * 1000, verbosity=1, milliseconds=False)