From d5de31338463ff8d47439813118059de14e76695 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 12 Aug 2022 16:29:51 +0200 Subject: [PATCH] fix binding search --- ereuse_devicehub/inventory/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index 3b1bff66..86770593 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -176,16 +176,18 @@ class BindingSearchView(GenericMixin): self.context.update( { - 'page_title': 'Search a Device for to do a binding from {}'.format(device.devicehub_id), + 'page_title': 'Search a Device for to do a binding from {}'.format( + device.devicehub_id + ), 'form_binding': form_binding, - 'device': device + 'device': device, } ) if form_binding.validate_on_submit(): next_url = url_for( 'inventory.binding', - dhid=id, + dhid=dhid, phid=form_binding.placeholder.phid, ) return flask.redirect(next_url) @@ -1248,5 +1250,6 @@ devices.add_url_rule( '/unbinding//', view_func=UnBindingView.as_view('unbinding') ) devices.add_url_rule( - '//binding/', view_func=BindingSearchView.as_view('binding_search') + '/device//binding/', + view_func=BindingSearchView.as_view('binding_search'), )