Python API: get base.list_rows view argument doesn't work with a filter for links

Hello,

the issue I’m facing is that i use a view to filter input rows for a script, but the view filters including links are broken. I can’t reproduce this in a smaller base, so the screenshots are taken from the base where the issue occurs.

first the proof of the issue:

this is the view without any filters


this is the scripts output. all working as expected.

this is that same view with the filter “link_field is empty” applied. there are no valid entries (at the moment)


however, here is the scripts output. there should be 0 items returned.

and here is the inverse, “link_field is not empty” as filter, many thousand entries.


yet here the script doesn’t output anything, when it should be showing 1000 entries.

What is causing the bug?

I have used this way of filtering in the past and it used to work. My suspicion is, that a newer change in the seatable API caused this issue.

if we take a look at a single row getting returned and specifically its donor field, we see that it is empty:

{'[auto number]': '20230906-0001', 'Donor': [], '_locked': None, '_locked_by': None, '_archived': False, '_creator': '87725181638147c69955c07c7ff926a9@auth.local', '_ctime': '2023-04-25T10:45:49.191+02:00', '_last_modifier': '45929391638147c69955c07c7ff926a9@auth.local', '_mtime': '2025-01-07T01:49:06.736+01:00', '_id': 'JwnCSzERQ3a-YTS3dixaeQ'},

this was not always the case, link columns used to return up to 10 links as an object of display_value and row_id, if i remember correctly.

I suspect that when you retrieve the contents of a view with the API, the api runs the filter itself in some form, but because a newer change causes link fields to always be empty (likely to encourage using the correct method to retrieve links) the returned result is faulty as soon as a link field filter is involved.

Cloud or self hosted?
Version?

ah i forgot about that part. its cloud

Unfortunately, I can’t reproduce this error. I created the same structure but the python script returns the correct data for the two views I created:

  • without links
  • with links

Can you create a copy of the base, delete private data and export and send it to support@seatable.io? I would like to analyze this further.

1 Like

i didn’t manage to reproduce it in a different base either, but it is still showing up in a base reduced to the minimum. I have sent it to support. thanks for looking into this!

hey, while trying to debug this issue further i found another issue which i think might be responsible for the original one: base.get_linked_records doesn’t return any links. that explains why they don’t show up when retrieving the rows (there used to be up to 10 that showed and that still happens in other bases) and whatever logic is used to apply the filters probably breaks because of that as well. maybe this helps.

I checked the base you provided and I can tell you, that you link column is broken.
As soon as you create a new link column, copy-and-paste all links with the help of a text column and change the filter, then it is working as expected.

  • filter link is not empty => returns 0 rows for base.listrows
  • filter Link to other records is not empty => returns 454 rows for base.listrows

I tried to figur out, what is the problem with your link column, but I was not successful.

Did you remember, how you created this link column? Did you do something special with this row?

Best regards
Christoph

1 Like

Oh that is very weird, thank you for the fast and easy fix. Sadly i have no idea what could have caused this, ill report it if i ever find out. Thanks again!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.