also include related
This commit is contained in:
parent
81e6770867
commit
e5195da141
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue