Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error 500 after two consecutive PATCH requests #1931

Open
gcakir opened this issue Apr 30, 2024 · 2 comments · May be fixed by #1932
Open

Internal Server Error 500 after two consecutive PATCH requests #1931

gcakir opened this issue Apr 30, 2024 · 2 comments · May be fixed by #1932

Comments

@gcakir
Copy link
Contributor

gcakir commented Apr 30, 2024

While adding data to the draft, the first PATCH request successfully adds data to the existing draft. But if the same request is made with the identical payload/data (e.g. [email protected]) for the same path (e.g. contact_email), Internal Server Error (500) will be returned from the API.

data_patch = [

    {"op": "add", "path": "/contact_email", "value": "[email protected]"},

]

This seems to be happening because publication state disappears in

del new_deposit['publication_state']

Could it be that whole block in this part is indented one level less than it should be?

@JohannesLares
@hjhsalo

@hjhsalo
Copy link
Member

hjhsalo commented May 3, 2024

The indent theory has been briefly tested and it seems that fixing indentation fixes the problem.
Full unit test suite was not yet run. @gcakir do you want to open a pull request?

@gcakir gcakir linked a pull request May 3, 2024 that will close this issue
@gcakir
Copy link
Contributor Author

gcakir commented May 7, 2024

The indent theory has been briefly tested and it seems that fixing indentation fixes the problem. Full unit test suite was not yet run. @gcakir do you want to open a pull request?

Pull request created. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants