Fix incorrect handling of overwrite flag

This commit is contained in:
Joshua Boniface 2021-06-29 18:22:01 -04:00
parent f91c07fdcf
commit aae9ae2e80
1 changed files with 3 additions and 1 deletions

View File

@ -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