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

Fix graph:type choices under /api/extras/_choices/

This commit is contained in:
Jeremy Stretch
2020-01-10 12:18:56 -05:00
parent 830a51d9f5
commit 69a696a8d6
4 changed files with 12 additions and 5 deletions

View File

@ -410,9 +410,7 @@ class Graph(models.Model):
type = models.ForeignKey(
to=ContentType,
on_delete=models.CASCADE,
limit_choices_to={
'model__in': ['device', 'interface', 'provider', 'site']
}
limit_choices_to=model_names_to_filter_dict(GRAPH_MODELS)
)
weight = models.PositiveSmallIntegerField(
default=1000