mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Moves the mktime call into the if block where it is used, preventing exceptions during rare cases
This commit is contained in:
parent
f43c3e0dd6
commit
06e2500443
@ -311,8 +311,8 @@ class Command(BaseCommand):
|
|||||||
archive_target = None
|
archive_target = None
|
||||||
|
|
||||||
# 3.4. write files to target folder
|
# 3.4. write files to target folder
|
||||||
t = int(time.mktime(document.created.timetuple()))
|
|
||||||
if document.storage_type == Document.STORAGE_TYPE_GPG:
|
if document.storage_type == Document.STORAGE_TYPE_GPG:
|
||||||
|
t = int(time.mktime(document.created.timetuple()))
|
||||||
|
|
||||||
original_target.parent.mkdir(parents=True, exist_ok=True)
|
original_target.parent.mkdir(parents=True, exist_ok=True)
|
||||||
with document.source_file as out_file:
|
with document.source_file as out_file:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user