From c11c0e751313491a1fbbdba744422f916842b63b Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Wed, 17 Feb 2021 17:19:01 +0100 Subject: [PATCH] Maintenance: Frozen time makes History entry order unpredictable in MySQL environment tests. --- app/models/history.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/history.rb b/app/models/history.rb index 662a555e6..68efb33e5 100644 --- a/app/models/history.rb +++ b/app/models/history.rb @@ -163,7 +163,7 @@ returns ) end - histories = histories.order(:created_at) + histories = histories.order(:created_at, :id) list = histories.map(&:attributes).each do |data| data['object'] = History::Object.lookup(id: data.delete('history_object_id'))&.name