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

View File

@ -246,7 +246,7 @@
</a>
{% if oidc %}
<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
</a>
{% endif %}

View File

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