Skip to content

Commit

Permalink
refactor: Changed if condition to use drive type instead of name beca…
Browse files Browse the repository at this point in the history
…use it standardized and consistent.
  • Loading branch information
gtdang authored and ntolley committed Aug 12, 2024
1 parent a57e19a commit 7747aa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ def add_drive_widget(drive_type, drive_boxes, drive_widgets, drives_out,

for idx, drive in enumerate(drive_widgets):
tab_name = drive['name']
if "tonic" not in tab_name.lower():
if drive['type'] != 'Tonic':
tab_name += f" ({drive['location']})"
accordion.set_title(idx, tab_name)

Expand Down Expand Up @@ -2117,7 +2117,7 @@ def handle_backend_change(backend_type, backend_config, mpi_cmd, n_jobs):

def _is_valid_add_tonic_input(drive_widgets):
for drive in drive_widgets:
if "Tonic" in drive['name']:
if drive['type'] == 'Tonic':
return False
return True

Expand Down

0 comments on commit 7747aa1

Please sign in to comment.