Skip to content

Commit f696b04

Browse files
committed
fix torchbox issues
1 parent 73503ca commit f696b04

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/wagtailmarkdown/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _get_nh3_kwargs():
6161

6262
if "allowed_attributes" in settings.WAGTAILMARKDOWN:
6363
if override:
64-
nh3_kwargs["attributes"] = {k: set(v) for k, v in settings.WAGTAILMARKDOWN["allowed_attributes"].items()}
64+
nh3_kwargs["attributes"] = dict((k, set(v)) for k, v in settings.WAGTAILMARKDOWN["allowed_attributes"].items())
6565
else:
6666
# Convert nh3 default attributes to same format as user attributes
6767
default_attrs = nh3_kwargs.get("attributes", {})

tests/testapp/tests/test_settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def test_get_nh3_kwargs_with_tags(self):
144144
)
145145

146146
def test_get_nh3_kwargs_with_attributes(self):
147-
allowed = {"*": {"data-test"}}
148147
with override_settings(WAGTAILMARKDOWN={"allowed_attributes": {"*": ["data-test"]}}):
149148
expected = DEFAULT_NH3_KWARGS["attributes"].copy()
150149
expected["*"].add("data-test")

0 commit comments

Comments
 (0)