usdigitalresponse / usdr-gost

USDR-hosted grants management tools
http://grants.usdigitalresponse.org
Apache License 2.0
31 stars 21 forks source link

[Infra] Unable to delete an agency that used to have a user in it. #1197

Open mhuang-usdr opened 1 year ago

mhuang-usdr commented 1 year ago

Expected behavior:

Current behavior:

fetchApi.js:41 DELETE https://api.grants.usdigitalresponse.org/api/organizations/0/agencies/del/1 500 g @ fetchApi.js:41 deleteAgency @ agencies.js:26 (anonymous) @ vuex.esm.js:851 y.dispatch @ vuex.esm.js:516 dispatch @ vuex.esm.js:406 F.forEach.n.<computed> @ vuex.esm.js:1064 (anonymous) @ EditAgency.vue:201 Promise.then (async) handleDelete @ EditAgency.vue:200 En @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Co.i._wrapper @ vue.runtime.esm.js:7473

fetchApi.js:48 Uncaught (in promise) Error: {"status":500,"message":"Internal Server Error"} at fetchApi.js:48:40 (anonymous) @ fetchApi.js:48

ed-snodgrass commented 1 year ago

I tried this running locally (with Docker) and I was able to delete an Agency after adding a user and then deleting the user. I'm not suggesting this is fixed, just noting it worked locally. If this bug still exists then I'd be curious what the environment differences are between those databases.

ClaireValdivia commented 11 months ago

Thanks Ed, I'll do some testing to see if I can recreate

ClaireValdivia commented 10 months ago

tested and this seems to be working fine now! I had two users in an agency - confirmed that I could not delete the agency while the users were in it; but once the users were deleted, I successfully deleted the agency. closing this issue.