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

Allow create paper with no doi #1942

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

koutst
Copy link
Contributor

@koutst koutst commented Oct 25, 2024

@koutst koutst requested a review from a team as a code owner October 25, 2024 17:43
Copy link

sonarcloud bot commented Oct 25, 2024

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 64.03%. Comparing base (155c11f) to head (68a6f7c).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/paper/views/paper_views.py 28.57% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1942      +/-   ##
==========================================
- Coverage   64.04%   64.03%   -0.02%     
==========================================
  Files         406      406              
  Lines       23590    23591       +1     
==========================================
- Hits        15108    15106       -2     
- Misses       8482     8485       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

duplicate_papers = Paper.objects.filter(doi=doi)
if duplicate_papers.exists():
serializer = DynamicPaperSerializer(
duplicate_papers[:1],
Copy link
Contributor

Choose a reason for hiding this comment

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

This line a bit confusing. I'm sure it's not the case, but seems arbitrary to select [:1]. Maybe we can alias?

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.

Add endpoint for paper creation
2 participants