from sqlalchemy.sql.elements import ColumnElement
from sqlalchemy import or_
+from o2common.views.route_exception import BadRequestException
+
from o2common.helper import o2logging
logger = o2logging.get_logger(__name__)
if not hasattr(obj, key):
logger.warning('Filter attrName %s not in Object %s.' %
(key, str(obj)))
- return []
+ raise BadRequestException(
+ 'Filter attrName {} not in the Object'.format(key))
if operation in ['eq', 'neq', 'gt', 'lt', 'gte', 'lte']:
if len(values) != 1: