Closed Vrajs16 closed 1 year ago
Sorry but i cannot reproduce your issue with the current master branch of this repo. Are you sure that your record field "image" is present in the database as a relational field?
The test case
def test_get_record_expand_full_list(self, client: PocketBase, state):
rel = client.collection(state.coll.id).get_full_list(
query_params={"expand": "rel"}
)
i = 0
for r in rel:
while r != None:
if hasattr(r, "expand"):
if "rel" in r.expand:
i += 1
r = r.expand["rel"]
continue
r = None
assert i == 10
works well on a example database that has 10 records each with a relational field "rel". I just tested this to work both with a pocketbase v0.13.1 as well as the current pocketbase v0.16.4.
note even a recursive expand with depth six query_params={"expand": "rel.rel.rel.rel.rel.rel"}
works well on my side
I'm experiencing a similar problem, but it only happens when I try to expand a multiple-choice relationship. It just works fine for single relationship fields.
I am trying to expand a relation, however I am getting the following error.
After further testing with the source_code, I noticed that even though data is typed as dict, I am getting a list.
Here is the output I am printing inside the load function:
Here is my query to the pocketbase function
get_full_list()