We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de5263d commit c028c2dCopy full SHA for c028c2d
scan_to_paperless/status.py
@@ -243,7 +243,7 @@ def set_current_folder(self, name: Path | None) -> None:
243
244
def set_status(
245
self,
246
- name: Path,
+ path: Path,
247
nb_images: int,
248
status: str,
249
details: str = "",
@@ -252,10 +252,7 @@ def set_status(
252
) -> None:
253
"""Set the status of a folder."""
254
# Config file name
255
- if name.name == "config.yaml":
256
- name = name.parent
257
- if len(name.parents) >= 1:
258
- name = name.parents[-2]
+ name = path.parent.name if path.name == "config.yaml" else path.name
259
if nb_images <= 0 and name in self._status:
260
nb_images = self._status[name].nb_images
261
self._status[Path(name)] = _Folder(nb_images, html.escape(status), details, step)
0 commit comments