Skip to content

Commit 921ecde

Browse files
committed
Fix force deletion
1 parent 707553d commit 921ecde

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

app/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,9 @@ def infoutputs(infid=None):
384384

385385
return render_template('outputs.html', infid=infid, outputs=outputs)
386386

387-
@app.route('/delete/<infid>')
387+
@app.route('/delete/<infid>/<force>')
388388
@authorized_with_valid_token
389-
def infdel(infid=None, force=False):
390-
389+
def infdel(infid=None, force=0):
391390
access_token = oidc_blueprint.session.token['access_token']
392391
auth_data = utils.getUserAuthData(access_token, cred, session["userid"])
393392
headers = {"Authorization": auth_data}

app/templates/infrastructures.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ <h5 class="modal-title" id="delete_confirm_label_{{infId}}">Confirm Infrastructu
102102
</div>
103103
<div class="modal-footer">
104104
<a class="btn btn-primary cancelBtn" role="button" data-dismiss="modal">Cancel</a>
105-
<a class="btn btn-danger deleteBtn" role="button" href="{{ url_for("infdel", infid=infId) }}">Delete</a>
106-
<a class="btn btn-danger foceDeleteBtn" role="button" title="The infrastructure will be deleted even if sonme resources are not correctly deleted" href="{{ url_for("infdel", infid=infId, force=True) }}"><span class="fas fa-exclamation-triangle mr-2"></span>Force Delete</a>
105+
<a class="btn btn-danger deleteBtn" role="button" href="{{ url_for('infdel', infid=infId, force=0) }}">Delete</a>
106+
<a class="btn btn-danger foceDeleteBtn" role="button" title="The infrastructure will be deleted even if sonme resources are not correctly deleted" href="{{ url_for('infdel', infid=infId, force=1) }}"><span class="fas fa-exclamation-triangle mr-2"></span>Force Delete</a>
107107
</div>
108108
</div>
109109
</div>

0 commit comments

Comments
 (0)