From 6491fb02478790dfef9d1a82262f74a0fafb2a4b Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Wed, 3 Oct 2018 22:17:36 +0200 Subject: [PATCH 1/3] Hotfix : Typo dans le nom de get_port_profile --- topologie/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topologie/models.py b/topologie/models.py index 5a147701..6284a124 100644 --- a/topologie/models.py +++ b/topologie/models.py @@ -542,7 +542,7 @@ class Port(AclMixin, RevMixin, models.Model): return "Inconnue" @cached_property - def get_port_profil(self): + def get_port_profile(self): """Return the config profil for this port :returns: the profile of self (port)""" def profile_or_nothing(profile): From e84c2a4f485340c61d8e305c123320dbdabd1f47 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Wed, 3 Oct 2018 22:24:17 +0200 Subject: [PATCH 2/3] Hotfix : Typo dans le nom de get_port_profile --- api/serializers.py | 8 ++++---- topologie/templates/topologie/aff_port.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/serializers.py b/api/serializers.py index 94d20ed5..2365e30a 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -483,12 +483,12 @@ class SwitchPortSerializer(NamespacedHMSerializer): """Serialize `topologie.models.Port` objects """ - get_port_profil = NamespacedHIField(view_name='portprofile-detail', read_only=True) + get_port_profile = NamespacedHIField(view_name='portprofile-detail', read_only=True) class Meta: model = topologie.Port fields = ('switch', 'port', 'room', 'machine_interface', 'related', - 'custom_profile', 'state', 'get_port_profil', 'details', 'api_url') + 'custom_profile', 'state', 'get_port_profiel', 'details', 'api_url') extra_kwargs = { 'related': {'view_name': 'switchport-detail'}, 'api_url': {'view_name': 'switchport-detail'}, @@ -735,12 +735,12 @@ class SwitchBaySerializer(NamespacedHMSerializer): class PortsSerializer(NamespacedHMSerializer): """Serialize `machines.models.Ipv6List` objects. """ - get_port_profil = ProfilSerializer(read_only=True) + get_port_profile = ProfilSerializer(read_only=True) class Meta: model = topologie.Port - fields = ('state', 'port', 'pretty_name', 'get_port_profil') + fields = ('state', 'port', 'pretty_name', 'get_port_profile') diff --git a/topologie/templates/topologie/aff_port.html b/topologie/templates/topologie/aff_port.html index b781cc96..ef7e259c 100644 --- a/topologie/templates/topologie/aff_port.html +++ b/topologie/templates/topologie/aff_port.html @@ -91,7 +91,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% if not port.custom_profil %} {% trans "Default: " %} {% endif %} - {{ port.get_port_profil }} + {{ port.get_port_profile }} {{ port.details }} From f8ba60087e91b677f276c04fb498a1a40071b455 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Wed, 3 Oct 2018 22:44:49 +0200 Subject: [PATCH 3/3] Hotfix : Typo dans le hotfix de la typo --- api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/serializers.py b/api/serializers.py index 2365e30a..367d458d 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -488,7 +488,7 @@ class SwitchPortSerializer(NamespacedHMSerializer): class Meta: model = topologie.Port fields = ('switch', 'port', 'room', 'machine_interface', 'related', - 'custom_profile', 'state', 'get_port_profiel', 'details', 'api_url') + 'custom_profile', 'state', 'get_port_profile', 'details', 'api_url') extra_kwargs = { 'related': {'view_name': 'switchport-detail'}, 'api_url': {'view_name': 'switchport-detail'},