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

API does not have Calculate Delta Date function. #26

Merged
merged 1 commit into from
May 8, 2018

Conversation

nihadness
Copy link
Contributor

Current behavior before PR

'calculate_delta_date' function is missing.

--
I confirm I have tested the PR thoroughly and coded it according to PEP8
standards.

@nihadness
Copy link
Contributor Author

I just copied the function from Plone and it is only used when getting query values for 'recent_modified' and 'recent_created' parameters. And I think it would better to create a new function and handle those values in a different way. Instead of getting string and converting them to integer, users can send integer values which can show date difference in days. In that case we would be able to query objects that have been modified during last 3 days for example.

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.

Thanks for porting this function. Good idea to have a request parameter that takes days as integers.However, take care that you don't "mask" existing catalog indexes (request parameters are matched against existing catalog indexes...)

@ramonski ramonski merged commit 871959f into senaite:master May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants