Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ross I Kinsey
where
Commits
017fb798
Commit
017fb798
authored
Feb 24, 2020
by
axiiom
Browse files
issue when accessing children, see TODO on line 250
parent
c21f4dda
Changes
1
Hide whitespace changes
Inline
Side-by-side
where/app.py
View file @
017fb798
...
...
@@ -246,6 +246,8 @@ def search_resource(session, model_cls, data):
:param data: A dictionary containing search parameters
:return: a Flask Response object
'''
# TODO: returns 404 when accessing children - i think it should just return an empty array
query
=
session
.
query
(
model_cls
).
filter_by
(
**
data
)
resp
=
(
None
,
404
)
if
query
.
first
()
is
None
else
\
(
list
(
map
(
lambda
m
:
m
.
as_json
(),
query
.
limit
(
100
).
all
())),
200
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment