filter attribute 'last_updated__gte' has no effect on '/dcim/interfaces' #4818

Closed
opened 2025-12-29 19:20:55 +01:00 by adam · 2 comments
Owner

Originally created by @bb-Ricardo on GitHub (Apr 23, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.1

Python version

3.6

Steps to Reproduce

  1. Click on DCIM -> Interfaces
  2. select an existing interface
  3. change for example the description
  4. submit the change
  5. change the uri in the browser from "/dcim/interfaces/XXX/" to "/api/dcim/interfaces/XXX/"
  6. select the value of the last_updated attribute
  7. Use the value to filter DCIM Interfaces in the URL.

example: https://example.com/dcim/interfaces/?last_updated__gte=2021-04-23T15:03:50.972693Z

Expected Behavior

I expected that NetBox returns only interfaces which have been changed at or after the time stamp 2021-04-23T15:03:50.972693Z <- example

Observed Behavior

NetBox returns all interfaces

Originally created by @bb-Ricardo on GitHub (Apr 23, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.1 ### Python version 3.6 ### Steps to Reproduce 1. Click on DCIM -> Interfaces 2. select an existing interface 3. change for example the description 4. submit the change 5. change the uri in the browser from "/dcim/interfaces/XXX/" to "/api/dcim/interfaces/XXX/" 6. select the value of the `last_updated` attribute 7. Use the value to filter DCIM Interfaces in the URL. example: `https://example.com/dcim/interfaces/?last_updated__gte=2021-04-23T15:03:50.972693Z` ### Expected Behavior I expected that NetBox returns only interfaces which have been changed at or after the time stamp `2021-04-23T15:03:50.972693Z` <- example ### Observed Behavior NetBox returns all interfaces
adam added the type: bugstatus: accepted labels 2025-12-29 19:20:55 +01:00
adam closed this issue 2025-12-29 19:20:55 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 23, 2021):

Looks like we just need to inherit from CreatedUpdatedFilterSet for this and other models that had created and last_updated fields added for v2.11. But, we should probably take this opportunity to consolidate these into BaseFilter as they're now consistently applied.

@jeremystretch commented on GitHub (Apr 23, 2021): Looks like we just need to inherit from CreatedUpdatedFilterSet for this and other models that had `created` and `last_updated` fields added for v2.11. But, we should probably take this opportunity to consolidate these into BaseFilter as they're now consistently applied.
Author
Owner

@bb-Ricardo commented on GitHub (Apr 27, 2021):

Thank you for solving this issue so fast. Great work.

@bb-Ricardo commented on GitHub (Apr 27, 2021): Thank you for solving this issue so fast. Great work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4818