-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CPDLP-3958] Remove extra lead providers from seeds #5521
Conversation
Review app deployed to https://cpd-ecf-review-5521-web.test.teacherservices.cloud |
app/models/lead_provider.rb
Outdated
@@ -2,6 +2,16 @@ | |||
|
|||
# This is actually ECFLeadProvider in all but name. See https://github.com/DFE-Digital/early-careers-framework/issues/698 | |||
class LeadProvider < ApplicationRecord | |||
ALL_PROVIDERS = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this list can be in the seeds not in the main model? as we already define them there and this avoids confusion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good past Abeer's commet 👍
8947111
to
2615c50
Compare
2615c50
to
76d35d7
Compare
let(:lead_provider_1) { create(:lead_provider, name: "Capita") } | ||
let(:school_1) { NewSeeds::Scenarios::Schools::School.new.build.with_partnership_in(cohort:, lead_provider: lead_provider_1).chosen_fip_and_partnered_in(cohort:) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
school_1
doesn't seem to be used, not needed maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great spot tks 👍 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, otherwise good 👍
01e6e58
to
8c5da41
Compare
8c5da41
to
e59047b
Compare
|
Context
We currently have a set of known providers in production, however in seeds we create many other providers unnecessarily and the data for contracts and statements is not set up properly.
Changes proposed in this pull request
Ensure all seed data and participants for both ECTs/Mentors is attached to only the known lead providers.