Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dashboard/app/models/batch_connect/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def add_cluster_widget(attributes, attribute_list)
widget: 'select',
label: 'Cluster',
options: clusters.map do |c|
[c.metadata.title || c.id.to_s.titleize, c.id]
[c&.metadata&.title || c.id.to_s.titleize, c.id]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like since we're putting this in ood_core it's just [c.title, c.id] right? Though this'll be on hold until that API exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it will be, so we could either put this on hold until then or merge it now and know that we will be writing over this section before 4.1 is finished. I would also mention that we don't do safe calls on metadata.title anywhere else in the codebase, but I am happy to play it safe here until we get a chance to consider it carefully there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could either put this on hold until then or merge it now and know that we will be writing over this section before 4.1 is finished

Yea I'd say to hold it.

I would also mention that we don't do safe calls on metadata.title anywhere else

Yea that's what happens when there are reviews or a 2nd pair of eyes!

end
}.merge(defined_cluster_attr)
else
Expand Down