attmempt fix of issue

This commit is contained in:
KF7EEL 2022-09-28 19:06:27 -07:00
parent a28fd43817
commit c41f91500e
1 changed files with 17 additions and 14 deletions

View File

@ -1313,21 +1313,24 @@ By using this service, you agree not to do anything malicious. You agree to use
if i.ip == '': if i.ip == '':
pass pass
else: else:
connected = Misc.query.filter_by(field_1='user_system_table_' + i.name).first() try:
connected_list = ast.literal_eval(connected.field_2) connected = Misc.query.filter_by(field_1='user_system_table_' + i.name).first()
connected_list = ast.literal_eval(connected.field_2)
## print(connected_list) ## print(connected_list)
clients = '''<div class="dropdown"> clients = '''<div class="dropdown">
<button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown"> <button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown">
Self Care Self Care
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
''' '''
for s in connected_list.items(): for s in connected_list.items():
for t in s[1]: for t in s[1]:
if str(current_user.username).upper() == t.upper(): if str(current_user.username).upper() == t.upper():
clients = clients + '''<li><a class="dropdown-item" href="/bridge_status/''' + i.name + '''/''' + s[0] + '''"">''' + s[0] + '''</a></li>\n''' clients = clients + '''<li><a class="dropdown-item" href="/bridge_status/''' + i.name + '''/''' + s[0] + '''"">''' + s[0] + '''</a></li>\n'''
clients = clients + '''</ul> clients = clients + '''</ul>
</div>''' </div>'''
except:
clients = ''
tool_menu = ''' tool_menu = '''
<div class="dropdown"> <div class="dropdown">