Created
March 6, 2020 10:37
-
-
Save jgigault/f12dbfafa73e1a24fddc2a64f6223432 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PaperTrail.request.whodunnit = User.find_by!(email: '[email protected]').id | |
Supplier.all.each do |s| | |
metadata = s.metadata | |
next if !metadata.key?('ecovadis') | |
metadata.delete('ecovadis') | |
s.save!(validate: false) | |
end | |
active_third_party_client = ThirdPartyClient.active.find_by_identifier(:ecovadis) | |
active_third_party_client_config = active_third_party_client.third_party_client_config | |
active_third_party_client_config.metadata['status_last_update'] = '1998-01-01' | |
active_third_party_client_config.save! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment