Skip to content

Commit 30b39cb

Browse files
committed
catch INVALID_TEXT_REPRESENTATION
1 parent 6c4eea9 commit 30b39cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

qiita_db/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# -----------------------------------------------------------------------------
2626
from qiita_core.exceptions import IncompetentQiitaDeveloperError
2727
from qiita_core.qiita_settings import qiita_config
28-
from psycopg2.errors import InvalidTextRepresentation
2928
import qiita_db as qdb
3029

3130

@@ -187,7 +186,9 @@ def __init__(self, id_):
187186
self._check_subclass()
188187
try:
189188
_id = self._check_id(id_)
190-
except InvalidTextRepresentation:
189+
except ValueError as error:
190+
if 'INVALID_TEXT_REPRESENTATION' not in str(error):
191+
raise error
191192
_id = False
192193

193194
if not _id:

0 commit comments

Comments
 (0)