From 1ae3c1a8405b96bc02a8d816dba07beb77fffc52 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 6 Jun 2024 16:28:38 +0200 Subject: views: exclude 00unknown and 10 from boot mode list Ignore '00unknown', '10' from the list of boot modes in the form shown in action/mode. --- ogcp/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ogcp/views.py b/ogcp/views.py index f910626..11ff7b5 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1766,6 +1766,8 @@ def action_mode(): 'memtest': 'Memory Test (memtest)', } + excluded_modes = ['00unknown', '10'] + most_used_mode = max(modes_set, key=lambda m: len(modes_set[m])) available_modes = [] if most_used_mode in r.json()['modes']: @@ -1773,7 +1775,7 @@ def action_mode(): available_modes.append(most_used_t) for mode in r.json()['modes']: - if mode != most_used_mode: + if mode != most_used_mode and mode not in excluded_modes: available_modes.append((mode, mode_descriptions.get(mode, mode))) if not available_modes: -- cgit v1.2.3-18-g5258