AURA: Allow '-' character in filter attribute

This commit is contained in:
Callum Brown 2021-03-07 14:23:17 +00:00
parent 9b9ff46e7d
commit a54ee43d57

View file

@ -142,7 +142,7 @@ class AURADocument:
"""Translate filters from request arguments to a beets Query."""
# The format of each filter key in the request parameter is:
# filter[<attribute>]. This regex extracts <attribute>.
pattern = re.compile(r"filter\[(?P<attribute>\w+)\]")
pattern = re.compile(r"filter\[(?P<attribute>[a-zA-Z0-9_-]+)\]")
queries = []
for key, value in request.args.items():
match = pattern.match(key)