Skip to content
Snippets Groups Projects
Verified Commit c38fe30e authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

fixes after testing

parent 404c8208
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,9 @@ for folder in cardDirs:
indexS = sections.index(d)
maxOrder = 0
# reset the ordering array per section
orderArr[indexS] = []
if len(localIndexArr[indexS]) == 0:
localIndexArr[indexS] = ["\n"]
......@@ -294,7 +297,7 @@ for folder in cardDirs:
# join all subcategories to the index
# if all subcategories have a predefined order
if len(orderArr[indexS]) == len(localIndexArr[indexS]) and len(orderArr[indexS]) > 0:
if len(orderArr[indexS]) <= len(localIndexArr[indexS]) and len(orderArr[indexS]) > 0:
X = localIndexArr[indexS][1:]
Y = orderArr[indexS]
localIndexArr[indexS] = [x for _, x in sorted(zip(Y, X))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment