Skip to content

Commit

Permalink
Update filter spec code
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel2392 committed Apr 18, 2024
1 parent 5623378 commit 8fa2519
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wagtail_fedit/adapters/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def get_response_data(self, parent_context=None):

filter_spec = self.kwargs.get("filter_spec", None)
if not filter_spec:
filter_spec = []
filter_spec = "original"

if not isinstance(filter_spec, str):
filter_spec = "|".join(filter_spec)

if image.is_svg() or self.kwargs.get("preserve_svg", False):
filter = Filter(to_svg_safe_spec(filter_spec.split("|")))
Expand Down

0 comments on commit 8fa2519

Please sign in to comment.