Skip to content

Commit

Permalink
Handle when PHOTOLOGUE_DIR is not a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Barran committed Jul 27, 2023
1 parent abaeaed commit 7775e49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Changelog

- Split out zip upload functionality into a separate function (#222) (contributed by lausek).
- Do not allow JS injection into the Photo caption field (#223) (bug detected by Domiee13).
- Fixed deprecation warnings from Pillow. Allow should fix #225.
- Fixed deprecation warnings from Pillow. Should fix #225.
- Handle when PHOTOLOGUE_DIR is not a string. Should fix #224.


3.15.1 (2022-02-23)
Expand Down
3 changes: 2 additions & 1 deletion photologue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from importlib import import_module
from inspect import isclass
from io import BytesIO
import pathlib

import exifread
from django.conf import settings
Expand Down Expand Up @@ -739,7 +740,7 @@ def post_process(self, im):

class Watermark(BaseEffect):
image = models.ImageField(_('image'),
upload_to=PHOTOLOGUE_DIR + "/watermarks")
upload_to=pathlib.Path(PHOTOLOGUE_DIR) / "watermarks")
style = models.CharField(_('style'),
max_length=5,
choices=WATERMARK_STYLE_CHOICES,
Expand Down

0 comments on commit 7775e49

Please sign in to comment.