diff --git a/api/dao/containerstorage.py b/api/dao/containerstorage.py index 17ed90464..24ac359a1 100644 --- a/api/dao/containerstorage.py +++ b/api/dao/containerstorage.py @@ -441,10 +441,8 @@ def __init__(self): super(SearchStorage, self).__init__('savesearches', use_object_id=True) def create_el(self, payload): - log.debug(payload) - payload = self._to_mongo(payload) try: - result = self.dbc.insert_one(payload, bypass_document_validation=True) + result = self.dbc.insert_one(payload) except pymongo.errors.DuplicateKeyError: raise APIConflictException('Object with id {} already exists.'.format(payload['_id'])) return result diff --git a/raml/examples/input/search-input.json b/raml/examples/input/search-input.json new file mode 100644 index 000000000..4ce20dd6c --- /dev/null +++ b/raml/examples/input/search-input.json @@ -0,0 +1,7 @@ +{ +"search": { + "return_type": "file", + "filters": [{"terms": {"file.type":["nifti"]}}] +}, +"label" : "Test Search" +} diff --git a/raml/examples/output/search.json b/raml/examples/output/search-output.json similarity index 99% rename from raml/examples/output/search.json rename to raml/examples/output/search-output.json index 189e06ce7..a005e15c2 100644 --- a/raml/examples/output/search.json +++ b/raml/examples/output/search-output.json @@ -7,4 +7,4 @@ }, "permissions": [{"access": "admin", "_id": "harshakethineni@invenshure.com"}], "creator": "harshakethineni@invenshure.com" -} \ No newline at end of file +}