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

Fix jsonapi returns None for sample's DateOfBirth field #114

Merged
merged 3 commits into from
Oct 26, 2024

Conversation

xispa
Copy link
Member

@xispa xispa commented Oct 23, 2024

Description of the issue/feature this PR addresses

This Pull Request adds a field manager for AgeDateOfBirthField so, the data is transformed properly for jsonapi to properly return the field value [dob, estimated, from_age]

Current behavior before PR

GET http://localhost:8080/senaite/@@API/senaite/v1/5f9a94bb2f734c5bb77fa28882d082c1

{
  ...
  "DateOfBirth": null,
  ...
}

Desired behavior after PR is merged

GET http://localhost:8080/senaite/@@API/senaite/v1/5f9a94bb2f734c5bb77fa28882d082c1

{
  ...
  "DateOfBirth": ["2009-12-11T00:00:00-04:00", false, false],
  ...
}

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa requested a review from ramonski October 23, 2024 14:32
@xispa xispa added the bug Something isn't working label Oct 23, 2024
Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@ramonski ramonski merged commit bb507f9 into master Oct 26, 2024
2 checks passed
@ramonski ramonski deleted the agedob-fieldmanagfer branch October 26, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants