This commit is contained in:
Cayo Puigdefabregas 2023-06-02 18:05:03 +02:00
parent 49d19ec38e
commit e3b8543a12
3 changed files with 2 additions and 8 deletions

View File

@ -24,7 +24,6 @@ class DidView(View):
self.device = None self.device = None
self.get_ids(id_dpp) self.get_ids(id_dpp)
# import pdb; pdb.set_trace()
self.context = { self.context = {
'version': __version__, 'version': __version__,
'oidc': 'oidc' in app.blueprints.keys(), 'oidc': 'oidc' in app.blueprints.keys(),
@ -102,10 +101,6 @@ class DidView(View):
if not device: if not device:
return flask.abort(404) return flask.abort(404)
abstract = None
if device.placeholder:
abstract = device.placeholder.binding
placeholder = device.binding or device.placeholder placeholder = device.binding or device.placeholder
device_abstract = placeholder and placeholder.binding or device device_abstract = placeholder and placeholder.binding or device
device_real = placeholder and placeholder.device or device device_real = placeholder and placeholder.device or device
@ -120,7 +115,6 @@ class DidView(View):
'device': self.device, 'device': self.device,
'device_abstract': device_abstract, 'device_abstract': device_abstract,
'device_real': device_real, 'device_real': device_real,
'abstract': abstract,
'components': components, 'components': components,
} }
) )

View File

@ -246,7 +246,7 @@
</a> </a>
{% if oidc %} {% if oidc %}
<br /> <br />
<a class="btn btn-primary mt-3" type="button" href="{{ url_for('oidc.login_other_inventory') }}?next={{ device_real.url.to_text() }}"> <a class="btn btn-primary mt-3" type="button" href="{{ url_for('oidc.login_other_inventory') }}?next={{ path }}">
User of other inventory User of other inventory
</a> </a>
{% endif %} {% endif %}

View File

@ -64,7 +64,7 @@ class LoginView(View):
class LogoutView(View): class LogoutView(View):
def dispatch_request(self): def dispatch_request(self):
session_vars = ['token_dlt', 'rols'] session_vars = ['token_dlt', 'rols', 'oidc']
[session.pop(i, '') for i in session_vars] [session.pop(i, '') for i in session_vars]
next_url = flask.request.args.get('next') next_url = flask.request.args.get('next')
logout_user() logout_user()