simplify a little

This commit is contained in:
Drew Gross
2016-04-25 23:39:42 -07:00
parent 874d10fc74
commit 5f564f32f5

View File

@@ -654,8 +654,7 @@ DatabaseController.prototype.find = function(className, query, {
if (!isMaster) {
query = addReadACL(query, aclGroup);
}
return schemaController.reloadData()
.then(() => schemaController.getOneSchema(className))
return schemaController.getOneSchema(className)
.catch(error => {
// If the schema doesn't exist, pretend it exists with no fields. This behaviour
// will likely need revisiting.