Skip to content

Commit af919fe

Browse files
authored
Merge pull request #24 from coding-blocks/filterRelationships
handle empty req
2 parents 17dd082 + eaf7941 commit af919fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/baseController.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class Controller {
134134
}
135135

136136
generateRelationshipWhereClause (req, modelName) {
137+
if (!req) return {}
137138
const { filterRelationships } = req.query
138139

139140
if (filterRelationships && filterRelationships[modelName]) return filterRelationships[modelName]

0 commit comments

Comments
 (0)