minor performance improvements
This commit is contained in:
parent
a149c7d7a0
commit
6706b93614
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ class Edit(models.Model):
|
||||||
clips_query = self.clip_query()
|
clips_query = self.clip_query()
|
||||||
if clips_query['conditions']:
|
if clips_query['conditions']:
|
||||||
clips = clip.models.Clip.objects.find({'query': clips_query}, user)
|
clips = clip.models.Clip.objects.find({'query': clips_query}, user)
|
||||||
items = [i['id'] for i in self.get_items(user).values('id')]
|
items = self.get_items(user).values('id')
|
||||||
clips = clips.filter(item__in=items)
|
clips = clips.filter(item__in=items)
|
||||||
else:
|
else:
|
||||||
clips = clip.models.Clip.objects.filter(id=None)
|
clips = clip.models.Clip.objects.filter(id=None)
|
||||||
|
|
Loading…
Reference in a new issue