Closes #3352: Enable filtering changelog API by changed_object_id

This commit is contained in:
Jeremy Stretch 2019-09-25 10:11:41 -04:00
parent 86cef1c502
commit d183a9e7b5
3 changed files with 6 additions and 3 deletions

View File

@ -2,6 +2,7 @@ v2.6.5 (FUTURE)
## Enhancements
* [#3352](https://github.com/netbox-community/netbox/issues/3352) - Enable filtering changelog API by `changed_object_id`
* [#3524](https://github.com/netbox-community/netbox/issues/3524) - Enable bulk editing of power outlet/power port associations
* [#3529](https://github.com/netbox-community/netbox/issues/3529) - Enable filtering circuits list by region

View File

@ -235,8 +235,8 @@ class ObjectChangeSerializer(serializers.ModelSerializer):
class Meta:
model = ObjectChange
fields = [
'id', 'time', 'user', 'user_name', 'request_id', 'action', 'changed_object_type', 'changed_object',
'object_data',
'id', 'time', 'user', 'user_name', 'request_id', 'action', 'changed_object_type', 'changed_object_id',
'changed_object', 'object_data',
]
@swagger_serializer_method(serializer_or_field=serializers.DictField)

View File

@ -230,7 +230,9 @@ class ObjectChangeFilter(django_filters.FilterSet):
class Meta:
model = ObjectChange
fields = ['user', 'user_name', 'request_id', 'action', 'changed_object_type', 'object_repr']
fields = [
'user', 'user_name', 'request_id', 'action', 'changed_object_type', 'changed_object_id', 'object_repr',
]
def search(self, queryset, name, value):
if not value.strip():