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

[ENG-7305] Enable to Withdraw Preprint Again After the preprint has been unwithdrawn #10998

Open
wants to merge 1 commit into
base: feature/b-and-i-25-01
Choose a base branch
from

Conversation

bodintsov
Copy link
Contributor

Purpose

Enable to Withdraw Preprint Again After the preprint has been unwithdrawn

Changes

TBD

QA Notes

TBD

Documentation

TBD

Side Effects

TBD

Ticket

(https://openscience.atlassian.net/browse/ENG-7305)

@bodintsov bodintsov marked this pull request as ready for review February 25, 2025 12:16
Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question

@@ -591,6 +591,7 @@ def post(self, request, *args, **kwargs):

from osf.utils.migrations import disable_auto_now_fields
with disable_auto_now_fields():
preprint.requests.all().delete()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is there not a middle ground between not deleting any requests and deleting all the requests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it is, in PreprintRequestCreateSerializer is a check for requests count, we can remove it or allow for multiple withdraw requests (not include active requests)

Copy link
Contributor Author

@bodintsov bodintsov Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my mind, a more suitable option is to add check for active withdraw requests and, in case of no active ones, to allow for another. In this case there is no need for deleting requests, and on unwithdraw action, we can set machine_state of that request to rejected.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove just the withdrawal request.

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 this pull request may close these issues.

2 participants