Created
April 24, 2023 08:40
-
-
Save Keqi/a02efd30040b8eaebe3ba00f3b4d49c8 to your computer and use it in GitHub Desktop.
This file contains 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
airtable_cohorts = Airtable::ProgramStructureApi.new.cohorts | |
ProgramCohort.find_each do |pc| | |
r = airtable_cohorts.find { |record| record.fields['Cohort Name'] == pc.name } | |
next unless r | |
pc.update(external_id: r.id) if pc.external_id != r.id | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment