We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13beeb4 commit 5cc93fbCopy full SHA for 5cc93fb
1 file changed
app/services/partners/family_request_create_service.rb
@@ -76,7 +76,10 @@ def item_requests_attributes
76
# If requested item(s) isn't visible to partners,
77
# an error specifying which item is not available is raised
78
def check_for_item_visibility
79
- invisible_items = item_requests_attributes.select { |attr| !included_items_by_id[attr[:item_id]].visible_to_partners }
+ invisible_items = item_requests_attributes.select { |attr|
80
+ !included_items_by_id[attr[:item_id]].nil? &&
81
+ !included_items_by_id[attr[:item_id]].visible_to_partners
82
+ }
83
84
unless invisible_items.empty?
85
0 commit comments