Skip to content

Commit

Permalink
CC Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevma50287 committed Oct 9, 2024
1 parent 3aae93a commit 8f45925
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions app/models/manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,11 @@ class Manifest < ApplicationRecord
def start!
# Reset stale manifests.
update!(fetched_files_status: :initialized) if ready_for_refresh?
raise BGS::SensitivityLevelCheckFailure.new, "You are not authorized to access this manifest" if
FeatureToggle.enabled?(:use_ce_api) &&
!sensitivity_checker.sensitivity_levels_compatible?(user: user, veteran_file_number: file_number)

if FeatureToggle.enabled?(:use_ce_api)
if sensitivity_checker.sensitivity_levels_compatible?(
user: user,
veteran_file_number: file_number
)
vbms_source.start!
else
raise BGS::SensitivityLevelCheckFailure.new, "You are not authorized to access this manifest"
end
else
vbms_source.start!
end
vbms_source.start!
vva_source.start! unless FeatureToggle.enabled?(:skip_vva)
end

Expand Down Expand Up @@ -176,6 +168,7 @@ def requested_zip_at

def update_veteran_info
return unless veteran

update(veteran_first_name: veteran.first_name || "",
veteran_last_name: veteran.last_name || "",
veteran_last_four_ssn: veteran.last_four_ssn || "")
Expand Down

0 comments on commit 8f45925

Please sign in to comment.