Skip to content

Commit

Permalink
Merge pull request #1377 from sbrunner/be-able-to-overide-cli
Browse files Browse the repository at this point in the history
Avoid error on no steps
  • Loading branch information
sbrunner authored Jul 14, 2024
2 parents 885bbd9 + 26b78ba commit dfed5c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scan_to_paperless/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ def _update_status(self, name: str) -> None:
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
source_images = config["steps"][-2]["sources"] if len(config["steps"]) >= 2 else config["sources"]
source_images = (
config["steps"][-2]["sources"] if len(config.get("steps", [])) >= 2 else config["images"]
)
generated_images = [f[len_folder:] for f in config["steps"][-1]["sources"]]
self.set_status(
name,
Expand Down

0 comments on commit dfed5c0

Please sign in to comment.