Bugfix and some extra debug logging
This commit is contained in:
parent
9cd7198005
commit
da938da38d
@ -93,9 +93,11 @@ def str2id(document_id):
|
||||
"""
|
||||
|
||||
if not document_id:
|
||||
raise wz_exceptions.BadRequest('Invalid object ID %r', document_id)
|
||||
log.debug('str2id(%r): Invalid Object ID', document_id)
|
||||
raise wz_exceptions.BadRequest('Invalid object ID %r' % document_id)
|
||||
|
||||
try:
|
||||
return bson.ObjectId(document_id)
|
||||
except bson.objectid.InvalidId:
|
||||
raise wz_exceptions.BadRequest('Invalid object ID %r', document_id)
|
||||
log.debug('str2id(%r): Invalid Object ID', document_id)
|
||||
raise wz_exceptions.BadRequest('Invalid object ID %r' % document_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user