Closed eugeniashurko closed 2 years ago
When doing forge.elastic(<query>) I get the resources of the following kind:
forge.elastic(<query>)
{ "@id": <id>, "@type": <type> ... }
However when trying to access the attributes id and type, I get the following error:
id
type
>> print(r.id) AttributeError: 'Resource' object has no attribute 'id'
>> print(r.type) AttributeError: 'Resource' object has no attribute 'type'
I am still able to access them by doing forge.as_json(r)["@id"] or forge.as_json(r)["@type"], but I am not sure it's a desirable behavior.
forge.as_json(r)["@id"]
forge.as_json(r)["@type"]
When doing
forge.elastic(<query>)
I get the resources of the following kind:However when trying to access the attributes
id
andtype
, I get the following error:I am still able to access them by doing
forge.as_json(r)["@id"]
orforge.as_json(r)["@type"]
, but I am not sure it's a desirable behavior.