Skip to content

Commit

Permalink
[qa] Avoid duplication of sortedm2m__str__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Apr 21, 2017
1 parent 7961ec3 commit 0b11395
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions openwisp_controller/config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from django_netjsonconfig.base.config import TemplatesVpnMixin as BaseMixin
from django_netjsonconfig.base.config import (AbstractConfig, get_random_key,
key_validator)
key_validator, sortedm2m__str__)
from django_netjsonconfig.base.template import AbstractTemplate
from django_netjsonconfig.base.vpn import AbstractVpn, AbstractVpnClient
from openwisp_users.mixins import OrgMixin, ShareableOrgMixin
Expand Down Expand Up @@ -82,13 +82,6 @@ class Meta(AbstractConfig.Meta):
abstract = False


def sortedm2m__str__(self):
"""
Improves string representation of m2m relationship objects
"""
return self.template.name


Config.templates.through.__str__ = sortedm2m__str__


Expand Down

0 comments on commit 0b11395

Please sign in to comment.