Fixed the url_period template tag to change on a copy of the request keyword arguments instead of the arguments of the request itself in the Mia core application.

This commit is contained in:
依瑪貓 2020-08-12 14:49:06 +08:00
parent 745d7bcdae
commit 1303532f69

View File

@ -64,7 +64,7 @@ def url_period(context, period_spec):
view_name = "%s:%s" % (
context.request.resolver_match.app_name,
context.request.resolver_match.url_name)
kwargs = context.request.resolver_match.kwargs
kwargs = context.request.resolver_match.kwargs.copy()
kwargs["period"] = period_spec
return reverse(view_name, kwargs=kwargs)