Skip to content

Commit

Permalink
Refs #37137 - fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz committed Feb 28, 2024
1 parent f0bad71 commit e3caee8
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 196 deletions.
14 changes: 7 additions & 7 deletions app/models/katello/concerns/host_managed_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,20 @@ def import_module_streams(module_streams)
context: module_stream["context"]
}
end
AvailableModuleStream.insert_all(
streams,
unique_by: %w[name stream context],
returning: %w[id name stream context]
)

if streams.any?
AvailableModuleStream.insert_all(
streams,
unique_by: %w[name stream context],
returning: %w[id name stream context]
)
end
indexed_module_streams = module_streams.index_by do |module_stream|
available_module_stream_id_from(
name: module_stream["name"],
stream: module_stream["stream"],
context: module_stream["context"]
)
end

sync_available_module_stream_associations(indexed_module_streams)
end

Expand Down
Loading

0 comments on commit e3caee8

Please sign in to comment.