1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

lsmodules() should only return native models

This commit is contained in:
Jeremy Stretch
2017-07-24 14:34:01 -04:00
parent 091cf390d2
commit 4047c1a4e4

View File

@@ -46,7 +46,7 @@ class Command(BaseCommand):
for name in dir(app_models):
model = getattr(app_models, name)
try:
if issubclass(model, Model):
if issubclass(model, Model) and model._meta.app_label == app:
namespace[name] = model
self.django_models[app].append(name)
except TypeError: