do not fail on document number not starting with an int

This commit is contained in:
Frédéric Péters 2011-11-23 13:04:30 +01:00
parent 421b7c357a
commit 664974bbee
1 changed files with 4 additions and 1 deletions

View File

@ -772,7 +772,10 @@ class SearchView(BrowserView):
def get_no_as_int(i):
if i:
return int(i.split('-')[0])
try:
return int(i.split('-')[0])
except ValueError:
return 99999
return 0
def cmp_dostype(x, y):