Skip to content

Commit

Permalink
#150: Ensure list flatten always returns the list in the same order
Browse files Browse the repository at this point in the history
- That function would return the elements of a list in different order each time (despite identical inputs each time) so this could prove more difficult to test
  • Loading branch information
MRichards99 committed Nov 19, 2020
1 parent e621f42 commit 7bf1141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datagateway_api/common/icat/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,4 @@ def flatten_query_included_fields(self, includes):
ICAT query
"""

return [m for n in (field.split(".") for field in includes) for m in n]
return [m for n in (field.split(".") for field in sorted(includes)) for m in n]

0 comments on commit 7bf1141

Please sign in to comment.