From 4732809c87a2319d496fc2fcd5815b61b5f14d73 Mon Sep 17 00:00:00 2001 From: Daniel Orner Date: Fri, 28 Jul 2023 16:40:09 -0400 Subject: [PATCH 1/4] #3764: Fix profile attachments saving --- app/services/partner_profile_update_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/partner_profile_update_service.rb b/app/services/partner_profile_update_service.rb index 4a8ee2dc98..de3c15bd0d 100644 --- a/app/services/partner_profile_update_service.rb +++ b/app/services/partner_profile_update_service.rb @@ -16,7 +16,6 @@ def call if @return_value @profile.served_areas.destroy_all - @profile.reload @profile.attributes = @profile_params @profile.save!(context: :edit) @profile.reload From 3e8eefafdd85c126c1d5d4b2b59c61b43511d6d4 Mon Sep 17 00:00:00 2001 From: Daniel Orner Date: Fri, 4 Aug 2023 16:30:30 -0400 Subject: [PATCH 2/4] One more reload --- app/services/partner_profile_update_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/partner_profile_update_service.rb b/app/services/partner_profile_update_service.rb index de3c15bd0d..d01914b152 100644 --- a/app/services/partner_profile_update_service.rb +++ b/app/services/partner_profile_update_service.rb @@ -18,7 +18,6 @@ def call @profile.served_areas.destroy_all @profile.attributes = @profile_params @profile.save!(context: :edit) - @profile.reload end end end @@ -28,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) From 537a32821fe5a6ed8f6144c7ab708dc6fe01a6d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 20:30:58 +0000 Subject: [PATCH 3/4] Render PlantUML files --- doc/architecture/barcode-retrieval.svg | 2 +- doc/architecture/multi-tenancy.svg | 2 +- doc/architecture/physical-flow.svg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/architecture/barcode-retrieval.svg b/doc/architecture/barcode-retrieval.svg index d89102a036..52787ea2bd 100644 --- a/doc/architecture/barcode-retrieval.svg +++ b/doc/architecture/barcode-retrieval.svg @@ -1 +1 @@ -Base ItemItemGlobal BarcodeBank BarcodeFallbackFallback \ No newline at end of file +Base ItemItemGlobal BarcodeBank BarcodeFallbackFallback \ No newline at end of file diff --git a/doc/architecture/multi-tenancy.svg b/doc/architecture/multi-tenancy.svg index 03ac2226f9..85a1ec8d90 100644 --- a/doc/architecture/multi-tenancy.svg +++ b/doc/architecture/multi-tenancy.svg @@ -1 +1 @@ -humanessentials.appBank APartner APartner BPartner CBank BUser A(Admin)User BUser CUser D \ No newline at end of file +humanessentials.appBank APartner APartner BPartner CBank BUser A(Admin)User BUser CUser D \ No newline at end of file diff --git a/doc/architecture/physical-flow.svg b/doc/architecture/physical-flow.svg index 27c9689262..1f8b5e611d 100644 --- a/doc/architecture/physical-flow.svg +++ b/doc/architecture/physical-flow.svg @@ -1 +1 @@ -BankPartnerInventoryAdjustmentTransferDistributionPurchaseIntakeDonationRecipient \ No newline at end of file +BankPartnerInventoryAdjustmentTransferDistributionPurchaseIntakeDonationRecipient \ No newline at end of file From b397852ee07e4a91110ac8736ae4dbf041bdde48 Mon Sep 17 00:00:00 2001 From: Brock Wilcox Date: Sat, 11 Nov 2023 23:22:03 -0500 Subject: [PATCH 4/4] Clean out some whitespace lint [#3764] --- app/services/partner_profile_update_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/partner_profile_update_service.rb b/app/services/partner_profile_update_service.rb index d01914b152..3fa2b6bbf7 100644 --- a/app/services/partner_profile_update_service.rb +++ b/app/services/partner_profile_update_service.rb @@ -27,7 +27,7 @@ def perform_profile_service(&block) @profile.transaction do yield block end - @profile.reload + @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)