diff --git a/tabellio/searchform/form.py b/tabellio/searchform/form.py index 08f2c48..3bb4420 100644 --- a/tabellio/searchform/form.py +++ b/tabellio/searchform/form.py @@ -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):