Test stabilization: Unexpected order if Tags get created in same ms.
This commit is contained in:
parent
789f2b4807
commit
bfd560ab49
1 changed files with 5 additions and 5 deletions
|
@ -149,17 +149,17 @@ returns
|
|||
def self.tag_list(data)
|
||||
tag_object_id_requested = Tag::Object.lookup(name: data[:object])
|
||||
return [] if !tag_object_id_requested
|
||||
|
||||
tag_search = Tag.where(
|
||||
tag_object_id: tag_object_id_requested,
|
||||
o_id: data[:o_id],
|
||||
)
|
||||
tags = []
|
||||
tag_search.each do |tag|
|
||||
).order(:id)
|
||||
|
||||
tag_search.each_with_object([]) do |tag, result|
|
||||
tag_item = Tag::Item.lookup(id: tag.tag_item_id)
|
||||
next if !tag_item
|
||||
tags.push tag_item.name
|
||||
result.push tag_item.name
|
||||
end
|
||||
tags
|
||||
end
|
||||
|
||||
class Object < ApplicationModel
|
||||
|
|
Loading…
Reference in a new issue