mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 03:27:21 -06:00
Closes #992: Allow the creation of multiple services per device with the same protocol and port
This commit is contained in:
parent
6f0f3cc115
commit
236229ea7e
@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.3 on 2017-08-03 19:37
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ipam', '0017_ipaddress_roles'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='service',
|
||||||
|
unique_together=set([]),
|
||||||
|
),
|
||||||
|
]
|
@ -600,7 +600,6 @@ class Service(CreatedUpdatedModel):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['device', 'protocol', 'port']
|
ordering = ['device', 'protocol', 'port']
|
||||||
unique_together = ['device', 'protocol', 'port']
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '{} ({}/{})'.format(self.name, self.port, self.get_protocol_display())
|
return '{} ({}/{})'.format(self.name, self.port, self.get_protocol_display())
|
||||||
|
Loading…
Reference in New Issue
Block a user