File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2525from PyQt5 .QtWidgets import QDateEdit , QTimeEdit
2626from ulc_mm_package .QtGUI .gui_constants import (
2727 ICON_PATH ,
28+ SITE_ENV_VAR ,
2829 SITE_LIST ,
2930 SAMPLE_LIST ,
3031 TOOLBAR_OFFSET ,
@@ -130,6 +131,9 @@ def _load_ui(self):
130131 self .site_val .addItems (SITE_LIST )
131132 self .sample_val .addItems (SAMPLE_LIST )
132133
134+ if SITE_ENV_VAR is not None :
135+ self .site_val .setEnabled (False )
136+
133137 # Set tab behavior
134138 self .notes_val .setTabChangesFocus (True )
135139
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ class QR(enum.Enum):
6868]
6969
7070# Reorder the site list to move the environment variable specified default site to the first location
71- site_env_var = os .getenv ("DEFAULT_SITE" )
71+ SITE_ENV_VAR = os .getenv ("DEFAULT_SITE" )
7272
73- if site_env_var in SITE_LIST :
74- SITE_LIST .insert (0 , SITE_LIST .pop (SITE_LIST .index (site_env_var )))
73+ if SITE_ENV_VAR in SITE_LIST :
74+ SITE_LIST .insert (0 , SITE_LIST .pop (SITE_LIST .index (SITE_ENV_VAR )))
7575
7676
7777CLINICAL_SAMPLE = "Whole blood (clinical, P. falciparum endemic)"
You can’t perform that action at this time.
0 commit comments