Commit 33117bad authored by Jérome Perrin's avatar Jérome Perrin

fixup! erp5_core: Make two queries in Base_getRelatedDocumentList

My suggestion of using sorted in
nexedi/erp5!1373 (comment 129103) was wrong,
ERP5 document do not sort in deterministic order. Use a key function to make
sure we get results in same order
parent ddc1fd16
......@@ -2923,8 +2923,8 @@ return 1
self.tic()
# Related follow_up File and Embedded File
self.assertEqual(
sorted([brain.getObject() for brain in getRelatedDocumentList()]),
sorted([sub_document_value, document_value])
sorted([brain.getObject() for brain in getRelatedDocumentList()], key=lambda doc: doc.getPath()),
sorted([sub_document_value, document_value], key=lambda doc: doc.getPath())
)
document_value.setFollowUpValue(None)
self.tic()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment