diff --git a/netbox_config_diff/views/configuration.py b/netbox_config_diff/views/configuration.py index 70d86d9..ce8ba4f 100644 --- a/netbox_config_diff/views/configuration.py +++ b/netbox_config_diff/views/configuration.py @@ -6,7 +6,7 @@ from core.tables import JobTable from django.contrib import messages from django.contrib.auth.models import User -from django.contrib.contenttypes.models import ContentType +from django.db.models import Q from django.http import HttpResponseForbidden from django.shortcuts import get_object_or_404, redirect, render from netbox.constants import RQ_QUEUE_DEFAULT @@ -300,9 +300,7 @@ def post(self, request, pk): class JobListView(generic.ObjectListView): - queryset = Job.objects.filter( - object_type=ContentType.objects.get(app_label="netbox_config_diff", model="configurationrequest") - ) + queryset = Job.objects.filter(Q(name__contains="push_configs") | Q(name__contains="collect_diffs")) filterset = JobFilterSet filterset_form = JobFilterForm table = JobTable