From cd398b15d83107ba5ee6f296d566f1b9d7a21622 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 1 Oct 2020 13:09:29 -0400 Subject: [PATCH] retrace_paths should ignore case in model names --- netbox/dcim/management/commands/retrace_paths.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/management/commands/retrace_paths.py b/netbox/dcim/management/commands/retrace_paths.py index b60537b37..a27833d62 100644 --- a/netbox/dcim/management/commands/retrace_paths.py +++ b/netbox/dcim/management/commands/retrace_paths.py @@ -4,7 +4,7 @@ from django.core.management.color import no_style from django.db import connection from django.db.models import Q -from dcim.models import CablePath, Interface +from dcim.models import CablePath from dcim.signals import create_cablepaths ENDPOINT_MODELS = ( @@ -31,7 +31,7 @@ class Command(BaseCommand): q = Q() for model_name in model_names: app_label, model = model_name.split('.') - q |= Q(app_label=app_label, model=model) + q |= Q(app_label__iexact=app_label, model__iexact=model) return ContentType.objects.filter(q) def handle(self, *model_names, **options):