Enable Write-Ahead Logging (WAL) for SQLite to improve performance when using it.

This commit is contained in:
krek0 2026-04-24 23:26:09 +02:00
parent 92e1336f80
commit 8458182990
3 changed files with 21 additions and 1 deletions

View file

@ -486,7 +486,7 @@ class ImageModel(models.Model):
self._old_image.storage.delete(
self._old_image.name
) # Delete (old) base image.
if self.date_taken is None or image_has_changed:
if (self.date_taken is None or image_has_changed) and self.image:
# Attempt to get the date the photo was taken from the EXIF data.
try:
exif_date = self.exif(self.image.file).get(