Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handle zero as valid pk/id in get_resource_id util method#1245

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

humayunah
Copy link
Contributor

@humayunahhumayunah commentedJul 22, 2024
edited
Loading

Fixes#1244

Description of the Change

  • handle zero as valid pk/id in get_resource_id util method
  • update tests to include cases where ID is zero

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name inAUTHORS

- update tests to include cases where ID is zero
@humayunah
Copy link
ContributorAuthor

@sliverc please review this and let me know if anything needs to be changed/added.

Copy link
Member

@slivercsliverc left a comment

Choose a reason for hiding this comment

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

Great job. Thanks for your work. I have only updated it slightly to avoid double lookup (hasattr) for performance reasons. Ready for merging.

humayun-intagleo reacted with heart emoji
@slivercsliverc merged commit75a5424 intodjango-json-api:mainJul 23, 2024
11 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@slivercslivercsliverc approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

id column integer primary key of 0 gets returned as null
2 participants
@humayunah@sliverc

[8]ページ先頭

©2009-2025 Movatter.jp