Projet

Général

Profil

0001-agent-ship-a-custom-import_template-for-combo-to-exc.patch

Frédéric Péters, 19 avril 2019 14:53

Télécharger (1,78 ko)

Voir les différences:

Subject: [PATCH] agent: ship a custom import_template for combo to exclude
 some names (#32495)

 .../management/commands/import_template.py    | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 hobo/agent/combo/management/commands/import_template.py
hobo/agent/combo/management/commands/import_template.py
1
# hobo - portal to configure and deploy applications
2
# Copyright (C) 2015-2019  Entr'ouvert
3
#
4
# This program is free software: you can redistribute it and/or modify it
5
# under the terms of the GNU Affero General Public License as published
6
# by the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU Affero General Public License for more details.
13
#
14
# You should have received a copy of the GNU Affero General Public License
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16

  
17

  
18
from hobo.agent.common.management.commands import import_template
19

  
20
class Command(import_template.Command):
21
    def handle(self, *args, **kwargs):
22
        if kwargs.get('template_name') in ('portal-user', 'portal-agent'):
23
            return
24
        return super(Command, self).handle(*args, **kwargs)
0
-