Skip to content

Closes #3663: API filter by created, last_updated #3680

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

Merged
merged 4 commits into from
Nov 15, 2019

Conversation

struppinet
Copy link

Fixes: #3663: API filter by created, last_updated

Creating a new class that the applicable existing FilterSets inherit. I think it makes sense to have exact, gte, and lte filters for the created and last_updated fields.

Copy link
Contributor

@lampwins lampwins left a comment

Choose a reason for hiding this comment

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

I like this, just a small PEP8 fix.

I think we should use a different name for the filter. Change logging is a concept we use in a different context. Perhaps CreatedUpdatedFilter?

Also, it would be nice to have a couple of tests for this.

@struppinet
Copy link
Author

Fixed PEP8 warnings, renamed class. (used the name because of the model inheritance "class ChangeLoggedModel(models.Model):"

@struppinet
Copy link
Author

I will check Tests with a friend and maybe add them on the weekend.

@jeremystretch jeremystretch merged commit bdd623f into netbox-community:develop Nov 15, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API filter by created, last_updated
3 participants