Merge pull request #306 from eReuse/feature/3439-wb-iso

fixing path
This commit is contained in:
cayop 2022-06-24 12:43:36 +02:00 committed by GitHub
commit 746df7e528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import os import os
import time import time
from pathlib import Path
import flask import flask
from flask import Blueprint from flask import Blueprint
@ -37,10 +38,9 @@ class SettingsView(GenericMixin):
return flask.render_template(self.template_name, **self.context) return flask.render_template(self.template_name, **self.context)
def get_iso(self): def get_iso(self):
path = Path(__file__).parent.parent
files = [ files = [
f f for f in os.listdir(f'{path}/static/iso/') if f[-3:].lower() == 'iso'
for f in os.listdir('ereuse_devicehub/static/iso/')
if f[-3:].lower() == 'iso'
] ]
self.context['iso'] = '' self.context['iso'] = ''