mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
The exporter now re-dates the files
This commit is contained in:
parent
db494ec250
commit
d69df37fb6
1 changed files with 5 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import gnupg
|
||||
import os
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
|
@ -47,6 +48,10 @@ class Command(BaseCommand):
|
|||
|
||||
with open(target, "wb") as f:
|
||||
f.write(GnuPG.decrypted(document.pdf))
|
||||
os.utime(target, times=(
|
||||
int(time.mktime(document.created.timetuple())),
|
||||
int(time.mktime(document.modified.timetuple()))
|
||||
))
|
||||
|
||||
def _render(self, text, verbosity):
|
||||
if self.verbosity >= verbosity:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue