aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/citco_ops/cash.py2
-rw-r--r--python/citco_ops/misc.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/python/citco_ops/cash.py b/python/citco_ops/cash.py
index 84a8c80b..7d322a2b 100644
--- a/python/citco_ops/cash.py
+++ b/python/citco_ops/cash.py
@@ -68,7 +68,7 @@ class IsoselCashReport(CashReport, fund="ISOSEL", account_number="ISOS01"):
for attach in msg.attachments:
message_time = attach.last_modified_time
if attach.name == "Attachment1.pgp" and message_time.date() == date:
- dest = get_dir(message_time.date())
+ dest = get_dir(message_time.date(), archived=False)
dest.mkdir(exist_ok=True, parents=True)
with attach.fp as fp:
plaintext, result, verify_result = gpg.Context().decrypt(
diff --git a/python/citco_ops/misc.py b/python/citco_ops/misc.py
index 1e02dc9a..56672b07 100644
--- a/python/citco_ops/misc.py
+++ b/python/citco_ops/misc.py
@@ -3,9 +3,9 @@ import datetime
from serenitas.utils.env import DAILY_DIR
-def get_dir(workdate: datetime.date) -> pathlib.Path:
+def get_dir(workdate: datetime.date, archived=True) -> pathlib.Path:
p = DAILY_DIR / str(workdate) / "Reports"
- if not p.exists():
+ if not p.exists() and archived:
p = (
DAILY_DIR
/ str(workdate.year)