fix unbinding

This commit is contained in:
Cayo Puigdefabregas 2022-08-09 13:19:16 +02:00
parent 967319f50c
commit 10879e6143
1 changed files with 6 additions and 0 deletions

View File

@ -265,6 +265,12 @@ class UnBindingView(GenericMixin):
device = placeholder.binding device = placeholder.binding
if device.is_abstract() != 'Twin':
dhid = device.devicehub_id
next_url = url_for('inventory.device_details', id=dhid)
messages.error('Device "{}" not is a Abstract device!'.format(dhid))
return flask.redirect(next_url)
self.get_context() self.get_context()
if request.method == 'POST': if request.method == 'POST':