dont fail in cancelDownloads, fixes #158
This commit is contained in:
parent
9e7dcf75a8
commit
86a9fafad2
1 changed files with 4 additions and 3 deletions
|
@ -324,9 +324,10 @@ def cancelDownloads(data):
|
||||||
if ids:
|
if ids:
|
||||||
for item in models.Item.query.filter(models.Item.id.in_(ids)):
|
for item in models.Item.query.filter(models.Item.id.in_(ids)):
|
||||||
t = models.Transfer.get(item.id)
|
t = models.Transfer.get(item.id)
|
||||||
t.progress = None
|
if t:
|
||||||
t.added = None
|
t.progress = None
|
||||||
t.save()
|
t.added = None
|
||||||
|
t.save()
|
||||||
p = state.user()
|
p = state.user()
|
||||||
if p in item.users:
|
if p in item.users:
|
||||||
item.users.remove(p)
|
item.users.remove(p)
|
||||||
|
|
Loading…
Reference in a new issue