From 8ff5623c7a6e7e18a71693765b9f6f4896dc4731 Mon Sep 17 00:00:00 2001 From: Dominik George <nik@naturalnet.de> Date: Tue, 14 Jan 2020 22:33:18 +0100 Subject: [PATCH] Fix type cast from GET --- calendarweek/django.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/calendarweek/django.py b/calendarweek/django.py index 8a6db3c..8a58260 100644 --- a/calendarweek/django.py +++ b/calendarweek/django.py @@ -88,7 +88,7 @@ def i18n_js(request: HttpRequest) -> HttpResponse: # Begin day names at this element # 0 (default = Monday, 6 = Sunday - first_day = request.GET.get("first_day", 0) + first_day = int(request.GET.get("first_day", "0")) day_indices = list(range(first_day, 7)) + list(range(0, first_day)) def reorder(l: List[Any], i: List[int]) -> List[Any]: return [l[n] for n in i] diff --git a/pyproject.toml b/pyproject.toml index c62ce06..55f4cd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "calendarweek" -version = "0.3.0" +version = "0.3.1" description = "Utilities for working with calendar weeks in Python and Django" authors = ["Dominik George <nik@naturalnet.de>", "Jonathan Weth <git@jonathanweth.de>"] license = "MIT" -- GitLab