Skip to content

Commit 8d79d81

Browse files
committed
reg: chek for empty job list when handling finished upload jobs
1 parent a9fe519 commit 8d79d81

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

dcoraid/gui/panel_uploads/widget_upload.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,10 @@ def on_upload_finished(self, dataset_id):
473473
def on_update_job_status(self):
474474
"""Update UI with information from self.jobs (UploadJobList)"""
475475
# Let everyone know when a job is done
476-
for job in self.jobs:
477-
if job.state == "done":
478-
self.on_upload_finished(job.dataset_id)
476+
if self.jobs:
477+
for job in self.jobs:
478+
if job.state == "done":
479+
self.on_upload_finished(job.dataset_id)
479480

480481
if not self.isVisible() or not self.jobs:
481482
# Don't update the UI if nobody is looking anyway.

0 commit comments

Comments
 (0)