From e779dceae2408ee8b53a473232d0869470793364 Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Wed, 4 Dec 2024 19:19:44 +0100 Subject: [PATCH] Make library store order deterministic --- backend/library/management/commands/storelibraries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/library/management/commands/storelibraries.py b/backend/library/management/commands/storelibraries.py index 617c74877..1cea6c96a 100644 --- a/backend/library/management/commands/storelibraries.py +++ b/backend/library/management/commands/storelibraries.py @@ -20,9 +20,9 @@ def handle(self, *args, **options): StoredLibrary.__init_class__() path = Path(options.get("path") or LIBRARIES_PATH) if path.is_dir(): - library_files = [ + library_files = sorted( f for f in path.iterdir() if f.is_file and f.suffix == ".yaml" - ] + ) else: library_files = [path] for fname in library_files: