File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,18 +8,23 @@ def initialize(school)
88 end
99
1010 def verify ( token : nil )
11+ success = false
1112 School . transaction do
1213 school . verify!
1314
14- # TODO: Remove this line once the feature flag is retired
15- SchoolOnboardingService . new ( school ) . onboard ( token : token ) unless FeatureFlags . immediate_school_onboarding?
15+ # TODO: Remove this line, once the feature flag is retired
16+ success = FeatureFlags . immediate_school_onboarding? || SchoolOnboardingService . new ( school ) . onboard ( token : token )
17+
18+ # TODO: Remove this line, once the feature flag is retired
19+ raise ActiveRecord ::Rollback unless success
1620 end
1721 rescue StandardError => e
1822 Sentry . capture_exception ( e )
1923 Rails . logger . error { "Failed to verify school #{ @school . id } : #{ e . message } " }
2024 false
2125 else
22- true
26+ # TODO: Return 'true', once the feature flag is retired
27+ success
2328 end
2429
2530 delegate :reject , to : :school
You can’t perform that action at this time.
0 commit comments