From ade06631cb4b96f737da4aa7e3593d8c96bb3520 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: May 03 2019 10:10:31 +0000 Subject: Fix updating project options with python2 Basically python2 does not have the ``.isnumeric()``method so using it will not work. This fixes updating the project's options via the API when pagure is deployed with python2. Fixes https://pagure.io/pagure/issue/4448 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/api/project.py b/pagure/api/project.py index 469baf7..e86652b 100644 --- a/pagure/api/project.py +++ b/pagure/api/project.py @@ -1986,7 +1986,7 @@ def _check_value(value): value = True elif str(value).lower() in ["false"]: value = True - elif str(value).isnumeric(): + elif str(value).isdigit(): value = int(value) return value