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

Move device and device_type ForeignKeys to abstract component models

This commit is contained in:
Jeremy Stretch
2020-07-02 13:07:32 -04:00
parent d03d302eef
commit 1f9cdc71d4
10 changed files with 186 additions and 207 deletions

View File

@ -1392,7 +1392,7 @@ class FrontPortTemplateCreateForm(ComponentTemplateCreateForm):
# Determine which rear port positions are occupied. These will be excluded from the list of available mappings.
occupied_port_positions = [
(front_port.rear_port_id, front_port.rear_port_position)
for front_port in device_type.frontport_templates.all()
for front_port in device_type.frontporttemplates.all()
]
# Populate rear port choices