#4454 Fix updating project options with python2
Merged 2 years ago by pingou. Opened 2 years ago by pingou.

file modified
+1 -1
@@ -1986,7 +1986,7 @@ 

          value = True

      elif str(value).lower() in ["false"]:

          value = True

-     elif str(value).isnumeric():

+     elif str(value).isdigit():

          value = int(value)

      return value


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 pingou@pingoured.fr

Thanks for the review! :)

Pull-Request has been merged by pingou

2 years ago