diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fb75751ab..b926e626a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Versioning](https://semver.org/spec/v2.0.0.html). - Fix autosuggest to redirect user directly on the course page when a course entry has been selected from the suggestion dropdown - Pin `django-treebeard` to `4.4` as the 4.5 release introduces BC +- Code update to support arrow 1.0 ## [2.1.0] - 2021-01-22 diff --git a/src/richie/apps/search/forms.py b/src/richie/apps/search/forms.py index 5021d6e93d..fd0f75e856 100644 --- a/src/richie/apps/search/forms.py +++ b/src/richie/apps/search/forms.py @@ -128,7 +128,7 @@ def get_script_fields(self): "id": "state", "params": { "languages": self.cleaned_data.get("languages") or None, - "ms_since_epoch": arrow.utcnow().timestamp * 1000, + "ms_since_epoch": arrow.utcnow().int_timestamp * 1000, "states": self.states, "use_case": "field", }, @@ -167,8 +167,8 @@ def get_sorting_script(self): "id": "state", "params": { "languages": self.cleaned_data.get("languages") or None, - "max_date": arrow.get(MAXYEAR, 12, 31).timestamp * 1000, - "ms_since_epoch": arrow.utcnow().timestamp * 1000, + "max_date": arrow.get(MAXYEAR, 12, 31).int_timestamp * 1000, + "ms_since_epoch": arrow.utcnow().int_timestamp * 1000, "states": self.states, "use_case": "sorting", },