Skip to content

Commit

Permalink
Merge pull request #3782 from rubyforgood/3764-fix-attachments
Browse files Browse the repository at this point in the history
#3764: Fix profile attachments saving
  • Loading branch information
awwaiid authored Mar 3, 2024
2 parents 6059f8e + b397852 commit 4619735
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/services/partner_profile_update_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ def call

if @return_value
@profile.served_areas.destroy_all
@profile.reload
@profile.attributes = @profile_params
@profile.save!(context: :edit)
@profile.reload
end
end
end
Expand All @@ -29,6 +27,7 @@ def perform_profile_service(&block)
@profile.transaction do
yield block
end
@profile.reload
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error "[!] #{self.class.name} failed to update profile #{@profile.id} because it does not exist"
set_error(e)
Expand Down
2 changes: 1 addition & 1 deletion doc/architecture/barcode-retrieval.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4619735

Please sign in to comment.