Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 152b0a64 authored by chirac's avatar chirac

Merge branch 'hotfix_typo_get_port_profile' into 'dev'

Hotfix typo get port profile

See merge request federez/re2o!324
parents 3db4f837 f8ba6008
...@@ -483,12 +483,12 @@ class SwitchPortSerializer(NamespacedHMSerializer): ...@@ -483,12 +483,12 @@ class SwitchPortSerializer(NamespacedHMSerializer):
"""Serialize `topologie.models.Port` objects """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: class Meta:
model = topologie.Port model = topologie.Port
fields = ('switch', 'port', 'room', 'machine_interface', 'related', fields = ('switch', 'port', 'room', 'machine_interface', 'related',
'custom_profile', 'state', 'get_port_profil', 'details', 'api_url') 'custom_profile', 'state', 'get_port_profile', 'details', 'api_url')
extra_kwargs = { extra_kwargs = {
'related': {'view_name': 'switchport-detail'}, 'related': {'view_name': 'switchport-detail'},
'api_url': {'view_name': 'switchport-detail'}, 'api_url': {'view_name': 'switchport-detail'},
...@@ -735,12 +735,12 @@ class SwitchBaySerializer(NamespacedHMSerializer): ...@@ -735,12 +735,12 @@ class SwitchBaySerializer(NamespacedHMSerializer):
class PortsSerializer(NamespacedHMSerializer): class PortsSerializer(NamespacedHMSerializer):
"""Serialize `machines.models.Ipv6List` objects. """Serialize `machines.models.Ipv6List` objects.
""" """
get_port_profil = ProfilSerializer(read_only=True) get_port_profile = ProfilSerializer(read_only=True)
class Meta: class Meta:
model = topologie.Port model = topologie.Port
fields = ('state', 'port', 'pretty_name', 'get_port_profil') fields = ('state', 'port', 'pretty_name', 'get_port_profile')
......
...@@ -542,7 +542,7 @@ class Port(AclMixin, RevMixin, models.Model): ...@@ -542,7 +542,7 @@ class Port(AclMixin, RevMixin, models.Model):
return "Inconnue" return "Inconnue"
@cached_property @cached_property
def get_port_profil(self): def get_port_profile(self):
"""Return the config profil for this port """Return the config profil for this port
:returns: the profile of self (port)""" :returns: the profile of self (port)"""
def profile_or_nothing(profile): def profile_or_nothing(profile):
......
...@@ -91,7 +91,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -91,7 +91,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if not port.custom_profil %} {% if not port.custom_profil %}
<u>{% trans "Default: " %}</u> <u>{% trans "Default: " %}</u>
{% endif %} {% endif %}
{{ port.get_port_profil }} {{ port.get_port_profile }}
</td> </td>
<td>{{ port.details }}</td> <td>{{ port.details }}</td>
<td class="text-right"> <td class="text-right">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment