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:
|
||||
for item in models.Item.query.filter(models.Item.id.in_(ids)):
|
||||
t = models.Transfer.get(item.id)
|
||||
t.progress = None
|
||||
t.added = None
|
||||
t.save()
|
||||
if t:
|
||||
t.progress = None
|
||||
t.added = None
|
||||
t.save()
|
||||
p = state.user()
|
||||
if p in item.users:
|
||||
item.users.remove(p)
|
||||
|
|
Loading…
Reference in a new issue