From 81543edab203d93545c84ca2a67d635276d023da Mon Sep 17 00:00:00 2001 From: j Date: Thu, 31 Jan 2019 15:25:26 +0530 Subject: [PATCH] fix adding to queue --- oml/item/models.py | 2 +- oml/user/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oml/item/models.py b/oml/item/models.py index a104506..a2b200a 100644 --- a/oml/item/models.py +++ b/oml/item/models.py @@ -844,7 +844,7 @@ def download_cover(id): else: url = None - logger.debug('download cover %s %s', self.id, url) + logger.debug('download cover %s %s', id, url) ratio = None try: cover = ox.net.read_url(url) diff --git a/oml/user/api.py b/oml/user/api.py index 87185c2..be190ad 100644 --- a/oml/user/api.py +++ b/oml/user/api.py @@ -305,7 +305,7 @@ def addListItems(data): if data['list'] == ':': from item.models import Item for item_id in data['items']: - i = Item.get(item_id) + i = Item.get(item_id, for_update=True) i.queue_download() i.update() elif data['list'] and (data['list'].startswith(':') or data['list'].endswith(':')):