Skip to content

The issue was actually integration not existing, not partner_account#9457

Merged
Jeremy1026 merged 3 commits intomainfrom
jcurcio/lg-10920-more-fixes-for-removing-sps
Oct 30, 2023
Merged

The issue was actually integration not existing, not partner_account#9457
Jeremy1026 merged 3 commits intomainfrom
jcurcio/lg-10920-more-fixes-for-removing-sps

Conversation

@Jeremy1026
Copy link
Contributor

🎫 Ticket

LG-10920

🛠 Summary of changes

There is additional checks required to have the rake task be able to continue through destroyable_records.rb. The issue is integration is nil, not integration.partner_account as I initially assumed based on the error.

Copy link
Contributor

@Sgtpluck Sgtpluck left a comment

Choose a reason for hiding this comment

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

oh good catch! i have a little suggestion to add a conditional just to give folks a little more info.

stdout.puts '********'
stdout.puts 'Integration:'
stdout.puts integration.attributes.to_yaml
stdout.puts integration&.attributes.to_yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

In this instance, it might be nice to have a conditional

if integration.nil?
 stdout.puts "No associated integration"
else 
  stdout.puts integration.attributes.to_yaml
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added!

stdout.puts '*******'
stdout.puts 'These are the IAA orders that will be affected: \n'
iaa_orders.each do |iaa_order|
iaa_orders&.each do |iaa_order|
Copy link
Contributor

Choose a reason for hiding this comment

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

likewise here:

if iaa_order.nil?
 stdout.puts "No IAA orders will be affected"
else 
  stdout.puts 'These are the IAA orders that will be affected: \n'
  iaa_orders.each do |iaa_order|
     stdout.puts "#{iaa_order.iaa_gtc.gtc_number} Order #{iaa_order.order_number}"
  end
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can get on board with more details being provided.

changelog: Internal, Cleanup, Fix removing service providers when the associated integration doesn’t exist
@Jeremy1026 Jeremy1026 force-pushed the jcurcio/lg-10920-more-fixes-for-removing-sps branch from 0e95d45 to 774849d Compare October 26, 2023 13:45
Copy link
Contributor

@nprimak nprimak left a comment

Choose a reason for hiding this comment

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

:shipit:

@Jeremy1026 Jeremy1026 merged commit 1d54c8c into main Oct 30, 2023
@Jeremy1026 Jeremy1026 deleted the jcurcio/lg-10920-more-fixes-for-removing-sps branch October 30, 2023 15:58
@amirbey amirbey mentioned this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants