fix: ensures you can query on nested block fields

This commit is contained in:
James
2022-08-11 15:02:17 -07:00
parent 103966d36e
commit ca852e8cb2
2 changed files with 3 additions and 1 deletions

View File

@@ -200,7 +200,7 @@ class ParamParser {
return;
}
if (priorSchemaType.instance === 'Mixed') {
if (priorSchemaType.instance === 'Mixed' || priorSchemaType.instance === 'Array') {
lastIncompletePath.path = currentPath;
}
}

View File

@@ -39,6 +39,8 @@ const connectMongoose = async (
try {
await mongoose.connect(urlToConnect, connectionOptions);
mongoose.set('strictQuery', false);
if (process.env.PAYLOAD_DROP_DATABASE === 'true') {
logger.info('---- DROPPING DATABASE ----');
await mongoose.connection.dropDatabase();