diff --git a/api/views_front.py b/api/views_front.py index 55ad446..31da4c5 100644 --- a/api/views_front.py +++ b/api/views_front.py @@ -223,8 +223,8 @@ def get_all_info(): devices[peer.rid]['rust_user'] = user.username for k, v in devices.items(): - devices[k]['status'] = _('Online') if (now-datetime.datetime.strptime(v['update_time'], '%Y-%m-%d %H:%M')).seconds <=120 else _('Offline') - sorted_devices = sorted(devices.items(), key=custom_sort, reverse=True) + devices[k]['status'] = _('Online') if (now-datetime.datetime.strptime(v['update_time'], '%Y-%m-%d %H:%M')).seconds <=120 else _('X') + sorted_devices = sorted(devices.items(), key=custom_sort) new_ordered_dict = {} for key, device in sorted_devices: new_ordered_dict[key] = device