Przeglądaj źródła

Fix Logical operator (#2143)

### What problem does this PR solve?

#2120 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
H 1 rok temu
rodzic
commit
527ebec2f5
No account linked to committer's email address
1 zmienionych plików z 0 dodań i 2 usunięć
  1. 0
    2
      agent/component/switch.py

+ 0
- 2
agent/component/switch.py Wyświetl plik

self.check_empty(self.conditions, "[Switch] conditions") self.check_empty(self.conditions, "[Switch] conditions")
for cond in self.conditions: for cond in self.conditions:
if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!") if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!")
if cond["logical_operator"] not in ["and", "or"] and len(cond["items"]) > 1:
raise ValueError(f"[Switch] Please set logical_operator correctly!")




class Switch(ComponentBase, ABC): class Switch(ComponentBase, ABC):

Ładowanie…
Anuluj
Zapisz