AkaBlas / akalisten

0 stars 0 forks source link

Sort Registers not Alphabetically but as in the Former Analoge Lists #3

Closed Bibo-Joshi closed 5 days ago

fscholdei commented 6 days ago

This could be difficult if the categories are not always named the same.

Bibo-Joshi commented 6 days ago

In the current implementation this is already solved:

https://github.com/AkaBlas/akalisten/blob/101f474cde053a9f3d7b5202fb0ff56ddfe9d759/akalisten/clients/polls.py#L74-L77

Because all existing options are stored first, because they are returned in the correct order by the polls API and because python dicts maintain order, the output is now rendered in same order as in the polls app.

I guess for now I can just add a corresponding comment above those lines. Then we rely only on the API to return the options in proper oder