diff --git a/imaginaerraum_door_admin/webapp.py b/imaginaerraum_door_admin/webapp.py index de610e6..93ec7c2 100644 --- a/imaginaerraum_door_admin/webapp.py +++ b/imaginaerraum_door_admin/webapp.py @@ -258,13 +258,13 @@ def list_tokens(): def token_log(): log = [] try: - with open(config.nfc_log) as f: + with open(current_app.config['NFC_LOG']) as f: log += f.readlines() log.reverse() log = [l.split(' - ') for l in log] return render_template('token_log.html', log=log) except Exception as e: - flash(f"NFC logfile {Path(config.nfc_log).absolute()} konnte nicht gelesen werden. Exception: {e}") + flash(f"NFC logfile {Path(current_app.config['NFC_LOG']).absolute()} konnte nicht gelesen werden. Exception: {e}") return redirect('/') # routes for registering, editing and deleting tokens