Issue with retrieving nested objects
See original GitHub issueI’m submitting a
- bug report.
- feature request.
Current Behaviour:
Retrieving nested objects like
{"@type": "Command", "DroneID": "1223",
"State": {"@type": "State", "DroneID": "-1000", "Battery": "50",
"Direction": "North", "Position": "1,1", "Status": "Active", "Speed": "100"}
}
causes the server to crash.
I guess this happened after the internal mechanism change that was done (Seggrigating nested objects at a different url location). When trying to retrieve any nested object, the server throws this error
[2019-03-24 21:33:05,891] ERROR in app: Exception on /api/CommandCollection/ba49e203-7d00-42d5-92dd-c630873559d0 [GET] Traceback (most recent call last): File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask_restful/__init__.py", line 480, in wrapper resp = resource(*args, **kwargs) File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask/views.py", line 88, in view return self.dispatch_request(*args, **kwargs) File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask_restful/__init__.py", line 595, in dispatch_request resp = meth(*args, **kwargs) File "/mnt/d/workspace/hydra/hydra-flock-demo/src/hydrus/hydrus/resources.py", line 106, in get session=get_session()) File "/mnt/d/workspace/hydra/hydra-flock-demo/src/hydrus/hydrus/data/crud.py", line 114, in get for collection in doc.collections: AttributeError: 'str' object has no attribute 'collections'
Expected Behaviour:
Nested objects should be returned properly.
Steps to reproduce:
- Run hydra-flock-central-controller
- add something to command collection
- retrieve that item
Do you want to work on this issue?
NO
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
I tried that but it didn’t work. Could you please try to find out what’s wrong with the demo?
Cool! @vddesai1871 please create an issue in the flock-demo repo