Projet

Général

Profil

0003-add-default-implementation-of-get_icon_class-15314.patch

Benjamin Dauvergne, 27 mars 2017 12:10

Télécharger (1,06 ko)

Voir les différences:

Subject: [PATCH 3/3] add default implementation of get_icon_class (#15314)

 passerelle/base/models.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
passerelle/base/models.py
146 146

  
147 147
    @classmethod
148 148
    def is_enabled(cls):
149
        # TODO: once the legacy connectors are ported, the test on
150
        # get_icon_class won't be necessary anymore.
151
        if not hasattr(cls, 'get_icon_class'):
152
            return False
153 149
        return getattr(settings, 'PASSERELLE_APP_%s_ENABLED' % cls._meta.app_label.upper(), True)
154 150

  
151
    @classmethod
152
    def get_icon_class(cls):
153
        return 'ressources'
154

  
155 155
    @property
156 156
    def requests(self):
157 157
        return passerelle.utils.LoggedRequest(logger=self.logger)
158
-