Fixes #18738: Ensure ScriptList respects script_order option

This commit is contained in:
Jason Novinger
2025-03-26 15:35:06 -05:00
parent be26f86b62
commit 39a96ddf3a
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -117,6 +117,15 @@ class ScriptModule(PythonModuleMixin, JobsMixin, ManagedFile):
def __str__(self):
return self.python_name
@property
def ordered_scripts(self):
script_objects = {s.name: s for s in self.scripts.all()}
ordered = [
script_objects.pop(sc) for sc in self.module_scripts.keys() if sc in script_objects
]
ordered.extend(script_objects.items())
return ordered
@property
def module_scripts(self):