make sure not to include cricom number in commission code (#1383)

This commit is contained in:
Frédéric Péters 2012-06-04 09:54:16 +02:00
parent 5b28e05df4
commit 186c5734e6
1 changed files with 1 additions and 1 deletions

View File

@ -958,7 +958,7 @@ class SyncFromPcfDbView(BrowserView):
if doctype == 'CRICOM':
nocric = object.no.split('-')[0]
try:
nocric, com_code, nocricom = re.match(r'(\d+)-(.*)(\d+)', object.no).groups()
nocric, com_code, nocricom = re.match(r'(\d+)-(.*?)(\d+)', object.no).groups()
except AttributeError:
# make sure we do not get anything afterwards
nocric, com_code, nocricom = '999', 'XXX', '999'