only add item to list once

This commit is contained in:
j 2016-01-10 17:24:41 +05:30
parent 8db9bdb9e2
commit ad6afd599e

View file

@ -254,7 +254,7 @@ class List(db.Model):
from item.models import Item
for item_id in items:
i = Item.get(item_id)
if i:
if i and i not in self.items:
self.items.append(i)
if self.user_id == settings.USER_ID:
i.queue_download()