Skip to content

Fix Organization Application State Corruption on Invalid Information Requests - #20302

Merged
JacobCoffee merged 3 commits into
pypi:mainfrom
alanbato:fix/information-request-status
Jul 31, 2026
Merged

Fix Organization Application State Corruption on Invalid Information Requests#20302
JacobCoffee merged 3 commits into
pypi:mainfrom
alanbato:fix/information-request-status

Conversation

@alanbato

Copy link
Copy Markdown
Contributor

Problem

While working on #20299, a pre-existing issue with the information request submission endpoint was found:

Status flips on empty message (services.py:259) — request_more_information sets status = MoreInformationNeeded before validating the message. Empty message → ValueError → view catches it → transaction still commits, so the status changes with no observation or email.

This meant that when a non-empty message was posted to the endpoint, we still changed the status of the organization application, leaving it in a corrupted state where it was awaiting information but the request of it was never sent.

This PR moves the status change to the code block where the information request is already validated.

@alanbato
alanbato requested a review from a team as a code owner July 21, 2026 23:14
@JacobCoffee
JacobCoffee enabled auto-merge (squash) July 22, 2026 15:05
@JacobCoffee

Copy link
Copy Markdown
Member

thanks @alanbato

@JacobCoffee
JacobCoffee merged commit dc6b05c into pypi:main Jul 31, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants