-
-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aggregation query parameter does not replace keys in the lists #1025
Comments
I solved the issue like this: def parse_aggregation_stage(d, key, value):
if isinstance(d, dict):
for st_key, st_value in d.items():
if isinstance(st_value, dict) or isinstance(st_value, list):
parse_aggregation_stage(st_value, key, value)
if key == st_value:
d[st_key] = value
if isinstance(d, list):
for st_idx, st_value in enumerate(d):
if isinstance(st_value, dict) or isinstance(st_value, list):
parse_aggregation_stage(st_value, key, value)
if key == st_value:
d[st_idx] = value |
Did you do the PR? |
+1 this resolves my problem. |
Hi, there is a work around for this problem. For example, if you have the following end points, which doesn't work as
However, you can overcome this problem by defining the endpoint like:
The query url is like
Note you need to use I have tested on my computer and it works. |
I'm having a similar problem and haven't had much luck. Is the unterminated quote in your example on |
@aarobc sorry, it should be a typo and the correct case would be |
Solved by #1058 |
I was working on an aggregation endpoint:
However, I found that
$family_id
and$user_id
are not getting replaced since the code only covers the case of a pure dictionary without lists.See:
eve/eve/methods/get.py
Line 126 in 22ea4bf
I'm new to Eve, so I'm not sure that what I found worth an error report. Though it took me quite a time to debug.
Best regards,
Youngjae
PS, Eve is AWESOME.
The text was updated successfully, but these errors were encountered: