-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
It's kind of unfortunate that we end up shuffling collections in API fields. For example, I noticed this in the ranger_handles field in the incidents endpoint (like this one: https://ranger-ims-staging.burningman.org/ims/api/events/2023/incidents/), and it's presumably the same for incident_types (https://ranger-ims-staging.burningman.org/ims/api/incident_types/).
Even if you start with sorted values in _db.py, they eventually get shuffled before encoding, because frozenset[str] are unordered, e.g. below
FYI @wsanchez
>>> for val in frozenset(("a","b","c")):
... print(val)
...
a
c
b
Metadata
Metadata
Assignees
Labels
No labels