forked from 0x2620/pandora
expose parts
This commit is contained in:
parent
4f71992f2b
commit
1d38cede3b
3 changed files with 13 additions and 8 deletions
|
|
@ -589,7 +589,7 @@ class Item(models.Model):
|
|||
def main_videos(self):
|
||||
#FIXME: needs to check if more than one user has main files and only
|
||||
# take from "higher" user
|
||||
videos = self.files.filter(is_main=True, is_video=True, available=True).order_by('part')
|
||||
videos = self.files.filter(is_main=True, is_video=True, available=True, instances__gt=0).order_by('part')
|
||||
if videos.count()>0:
|
||||
first = videos[0]
|
||||
user = first.instances.all()[0].volume.user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue