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

pids: pass optional DOI transitions in the upload form #2958

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

zzacharo
Copy link
Member

@zzacharo zzacharo commented Jan 14, 2025

Copy link
Contributor

@jrcastro2 jrcastro2 left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor comment


@wraps(f)
def view(*args, **kwargs):
response = make_response(f(*args, **kwargs))
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: I would check if the func already returns a Response, in that case we don't need the make_response, so it can be used by all funcs.

Suggested change
response = make_response(f(*args, **kwargs))
result = f(*args, **kwargs)
if isinstance(result, Response):
response = result
else:
response = make_response(result)```

@zzacharo zzacharo merged commit 02deb31 into inveniosoftware:master Jan 21, 2025
4 checks passed
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.

DOI: remaining work for optional DOIs
2 participants