From 756017a697d183d0ad7851f0112c3ad71b245e0c Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Mon, 1 May 2017 22:14:29 +0200 Subject: [PATCH] [FIX]Member number config default prefix when not fixed --- golem_member/models/golem_member.py | 4 ++-- golem_member_minor/{ => models}/golem_member.py | 0 .../{golem_member_view.xml => views/golem_member_views.xml} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename golem_member_minor/{ => models}/golem_member.py (100%) rename golem_member_minor/{golem_member_view.xml => views/golem_member_views.xml} (100%) diff --git a/golem_member/models/golem_member.py b/golem_member/models/golem_member.py index 44bb1ca..87c505a 100644 --- a/golem_member/models/golem_member.py +++ b/golem_member/models/golem_member.py @@ -114,7 +114,7 @@ class GolemMember(models.Model): season.member_counter += 1 season.write({'member_counter': season.member_counter}) pkey = 'golem_numberconfig_prefix' - pfx = conf.get_param(pkey) + pfx = conf.get_param(pkey, '') number = pfx + str(season.member_counter) data = {'member_id': member.id, 'season_id': season.id, @@ -138,7 +138,7 @@ class GolemMember(models.Model): last = int(conf.get_param('golem_number_counter', 0)) last += 1 conf.set_param('golem_number_counter', str(last)) - pfx = conf.get_param('golem_numberconfig_prefix') + pfx = conf.get_param('golem_numberconfig_prefix', '') number = pfx + str(last) data = {'member_id': self[0].id, 'season_id': None, diff --git a/golem_member_minor/golem_member.py b/golem_member_minor/models/golem_member.py similarity index 100% rename from golem_member_minor/golem_member.py rename to golem_member_minor/models/golem_member.py diff --git a/golem_member_minor/golem_member_view.xml b/golem_member_minor/views/golem_member_views.xml similarity index 100% rename from golem_member_minor/golem_member_view.xml rename to golem_member_minor/views/golem_member_views.xml