rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
436 stars 450 forks source link

Fix edge case on saving profile attachments #4472

Open cielf opened 5 days ago

cielf commented 5 days ago

Summary

There is a sequence on editing a profile with an upload that results in the file not being saved

Why fix?

Not saving things the users reasonably expect to be saved is not good... and we have seen the exception noted below in production.

Details

Recreation

Try this sequence: Sign in as verified@example.com Edit My Organization Choose a file for IRS Determination Letter Change the numbers in Area Served so that it no longer adds up to 100 Click Update Information gets an exception "Cannot get a signed_id for a new record"

What we need

That sequence should not produce an exception. If it is not going to result (after correcting other errors) in the file chosen being saved, we need to include that in the error messaging

Criteria for completion