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
!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
Pipeline #14225 failed with stage
in 0 seconds
...@@ -2923,8 +2923,8 @@ return 1 ...@@ -2923,8 +2923,8 @@ return 1
self.tic() self.tic()
# Related follow_up File and Embedded File # Related follow_up File and Embedded File
self.assertEqual( self.assertEqual(
sorted([brain.getObject() for brain in getRelatedDocumentList()]), sorted([brain.getObject() for brain in getRelatedDocumentList()], key=lambda doc: doc.getPath()),
sorted([sub_document_value, document_value]) sorted([sub_document_value, document_value], key=lambda doc: doc.getPath())
) )
document_value.setFollowUpValue(None) document_value.setFollowUpValue(None)
self.tic() 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