-
Notifications
You must be signed in to change notification settings - Fork 130
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
Issue with retrieving nested objects #374
Comments
@xadahiya please provide a proper link to the changes you are talking about I suppose you are talking about #295 by @vddesai1871 In place of the |
Yes, but that is when we retrieve the object. This is the object I used to store the object in CommandCollection. The server crashes when trying to retrieve this item. |
hydrus is working fine, I can not reproduce that same error in this repo. in hydrusRetrieving command object. (you can see link to the nested state object)Now retrieving the state object by dereferencing the link |
I tried that but it didn't work. Could you please try to find out what's wrong with the demo? |
|
To add to this, we might have to make tests for nested objects. We don't have any right now, that is why it was missed out before merging. |
There isn't any bug related to nested objects in hydrus. I added tests related to this (in test_app.py) when I added these changes. And I have tested it manually before and now, and it is working fine. You can see the screenshots I posted above or try reproducing that bug in this repo by adding an item to command collection and retrieve it. If we are clear on this then we can migrate this issue to flock-demo repository and investigate it there. |
Cool! @vddesai1871 please create an issue in the flock-demo repo |
I'm submitting a
Current Behaviour:
Retrieving nested objects like
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:
Do you want to work on this issue?
NO
The text was updated successfully, but these errors were encountered: