mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-17 12:06:55 +01: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue