Skip to content

Commit

Permalink
Merge pull request #1378 from sbrunner/be-able-to-overide-cli
Browse files Browse the repository at this point in the history
Avoid status error
  • Loading branch information
sbrunner authored Jul 14, 2024
2 parents dfed5c0 + e06272a commit bb36a9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scan_to_paperless/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ def _update_status(self, name: str) -> None:
}
nb_images = len(run_step["sources"])

if rerun or not os.path.exists(os.path.join(source_folder, name, "REMOVE_TO_CONTINUE")):
if (
rerun
or not os.path.exists(os.path.join(source_folder, name, "REMOVE_TO_CONTINUE"))
or len(config.get("steps", [])) == 0
):
self.set_status(name, nb_images, _WAITING_TO_STATUS.format(run_step["name"]), step=run_step)
else:
len_folder = len(os.path.join(source_folder, name).rstrip("/")) + 1
Expand Down

0 comments on commit bb36a9c

Please sign in to comment.