Преглед на файлове

fix OA when order is Null Close #260

nico преди 8 години
родител
ревизия
db4fc17382
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      kalliope/core/OrderAnalyser.py

+ 4 - 0
kalliope/core/OrderAnalyser.py

@@ -44,6 +44,10 @@ class OrderAnalyser:
 
         list_match_synapse = list()
 
+        # if the received order is None we can stop the process immediately
+        if order is None:
+            return list_match_synapse
+
         # test each synapse from the brain
         for synapse in cls.brain.synapses:
             # we are only concerned by synapse with a order type of signal