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) { if (!isMaster) {
query = addReadACL(query, aclGroup); query = addReadACL(query, aclGroup);
} }
return schemaController.reloadData() return schemaController.getOneSchema(className)
.then(() => schemaController.getOneSchema(className))
.catch(error => { .catch(error => {
// If the schema doesn't exist, pretend it exists with no fields. This behaviour // If the schema doesn't exist, pretend it exists with no fields. This behaviour
// will likely need revisiting. // will likely need revisiting.