Skip to content

Commit

Permalink
fix lattice validation (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
proy30 authored Jan 3, 2025
1 parent 69726d7 commit 881ff55
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ def on_lattice_element_name_change(selectedLattice, **kwargs):
@ctrl.add("add_latticeElement")
def on_add_lattice_element_click():
selectedLattice = state.selectedLattice
if selectedLattice:

if selectedLattice not in state.listOfLatticeElements:
state.isSelectedLatticeListEmpty = (
f"Lattice element '{selectedLattice}' does not exist."
)
else:
add_lattice_element()
state.dirty("selectedLatticeList")

Expand Down

0 comments on commit 881ff55

Please sign in to comment.