mirror of
https://github.com/kingmo888/rustdesk-api-server.git
synced 2026-02-21 10:27:23 +08:00
Update views_front.py
解决前台偶发500问题
This commit is contained in:
parent
5be3ce4bb2
commit
67967bbff9
@ -186,8 +186,9 @@ def get_all_info():
|
||||
|
||||
for peer in peers:
|
||||
user = UserProfile.objects.filter(Q(id=peer.uid)).first()
|
||||
devices[peer.rid]['rust_user'] = user.username
|
||||
|
||||
device = devices.get(peer.rid, None)
|
||||
if device:
|
||||
devices['rust_user'] = user.username
|
||||
|
||||
return [v for k,v in devices.items()]
|
||||
|
||||
@ -203,4 +204,4 @@ def work(request):
|
||||
all_info = get_all_info()
|
||||
print(all_info)
|
||||
|
||||
return render(request, 'show_work.html', {'single_info':single_info, 'all_info':all_info, 'u':u})
|
||||
return render(request, 'show_work.html', {'single_info':single_info, 'all_info':all_info, 'u':u})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user