From aae9ae2e806ca0b20ef946e240f657b4c4e43675 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 29 Jun 2021 18:22:01 -0400 Subject: [PATCH] Fix incorrect handling of overwrite flag --- api-daemon/pvcapid/flaskapi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api-daemon/pvcapid/flaskapi.py b/api-daemon/pvcapid/flaskapi.py index 2bca5f8c..3d77fad0 100755 --- a/api-daemon/pvcapid/flaskapi.py +++ b/api-daemon/pvcapid/flaskapi.py @@ -299,8 +299,10 @@ class API_Initialize(Resource): 400: description: Bad request """ - if reqargs.get('overwrite', False): + if reqargs.get('overwrite', 'False') == 'True': overwrite_flag = True + else: + overwrite_flag = False if api_helper.initialize_cluster(overwrite=overwrite_flag): return {"message": "Successfully initialized a new PVC cluster"}, 200