Skip to content

refactor: Allow existing Person in create_demo_person#6398

Merged
jennifer-richards merged 2 commits intoietf-tools:feat/rpc-apifrom
jennifer-richards:allow-existing-demopeople
Sep 28, 2023
Merged

refactor: Allow existing Person in create_demo_person#6398
jennifer-richards merged 2 commits intoietf-tools:feat/rpc-apifrom
jennifer-richards:allow-existing-demopeople

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

Instead of returning a 403 Forbidden error, just return the existing Person if a create_demo_person() API call tries to create a person who already exists. This avoids having to clean out the datatracker DB when re-running create_rpc_demo in the rpc tool.

Could instead handle the 403 (or return a distinct indicator that the name is in use, perhaps a 409 Conflict) and deal with this on the API caller side, but this is the lower hanging fix

@jennifer-richards jennifer-richards deleted the allow-existing-demopeople branch September 28, 2023 17:49
@jennifer-richards jennifer-richards restored the allow-existing-demopeople branch September 28, 2023 18:03
@jennifer-richards
Copy link
Copy Markdown
Member Author

Oops, thought I'd merged

@jennifer-richards jennifer-richards merged commit fd90d8b into ietf-tools:feat/rpc-api Sep 28, 2023
@jennifer-richards jennifer-richards deleted the allow-existing-demopeople branch September 28, 2023 18:05
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants