X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/049c5959e33d29e4c0044c235d291144d49d3c45..0f2ac86f03177aebee66a3890120d9926272cf27:/src/sources/models.py?ds=inline diff --git a/src/sources/models.py b/src/sources/models.py index 165cb67b..efa086a5 100644 --- a/src/sources/models.py +++ b/src/sources/models.py @@ -67,6 +67,7 @@ class Source(models.Model): return os.path.isdir(d) and os.listdir(d) def process(self): + processed_at = now() updir = os.path.join( settings.MEDIA_ROOT, self.get_upload_directory() @@ -83,7 +84,7 @@ class Source(models.Model): self.build_view_directory(updir, d) with utils.replace_dir(ocr_dir) as d: self.build_ocr_directory(updir, d) - self.processed_at = now() + self.processed_at = processed_at self.save(update_fields=['processed_at']) def build_view_directory(self, srcpath, targetpath):