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

Fix: Schema can try to execute when length is less than 1

Now it does nothing but print a warning.
Future work: create a Valid Range setting for the Schema, maybe with a node.
Joseph Brandenburg преди 7 месеца
родител
ревизия
5fc87cd47d
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      schema_solve.py

+ 3 - 0
schema_solve.py

@@ -578,6 +578,9 @@ class SchemaSolver:
                     
         
     def solve(self):
+        if self.solve_length < 1:
+            print (f"WARN: Schema {self.signature} has a length of 0 or less and will not expand.")
+            return {} # just don't do anything. This may cause errors if the Schema has dependencies - that's OK.
         for index in range(self.solve_length):
             self.index = index
             frame_mantis_nodes = self.solve_iteration()