Bug: API crashes when retrieving views with date filters

Server

  • Seatable 6.0.10 Enterprise self hosted.
  • Verified with Seatable cloud

The Problem

Sorry that I have to raise another issue, but I have found an unexpected behaviour on the API and need to verify whether it’s a bug, or just my expectations are wrong. Couldn’t find anything similar mentioned here.

To reproduce:

  1. Create any table with a date column and populate with some data. The “created“ column will do.

  2. Retreive the view via the API - I used Seatable’s integration into n8n as well as local python scripts in Seatable, using the internal API.

  3. The records will be retrieved as expected.

  4. Filter the view using the date column you have just created - use “Created is today“ or “Created is on exact date X“. All the records shown in the GUI are also retrieved via the API :white_check_mark:

  5. Filter the view using the date column you have just created - use “Created is on or before today“ or “Created is on or before exact date X“. The GUI still shows the lines created today, but the API retrieves nothing! :no_entry:

  6. Filter the same view with the date filter in a filter group like shown below. Again, the GUI shows the filtered rows as expected, while the API either returns “500 Server Error“ :no_entry:

    and sometimes this Error 400 :no_entry:

Can anyone verify? Am I doing something wrong? I’m not setting any filters or SQL clauses - I’m just using plain old API calls on filtered views. In terms of python scripts:

from seatable_api import Base, context

base = Base(context.api_token, context.server_url)
base.auth()
mytable = context.current_table
# get filtered view
rows = base.list_rows('Table1', 'Default View')

That script crashes when the view is filtered like under 5. or 6.

1 Like

I confirm the first issue (your no. 5). I created a bug report.

Your no. 6 is a known issue that is going to be fixed in SeaTable 6.1. The problem emerges when you use “complex” filter rules. A complex filter rule is a rule using filter groups. The list_rows endpoint cannot handle “complex” filter rule.

Thanks for the quick verification - I thought I was doing something wrong, or - more seriously - was going crazy :slight_smile:

@ppm

Sorry for the inconvenience!

Sorry from my side - I have the feeling that I’m pushing the release date of 6.1 single-handedly by finding weird bugs. But it’s @ppm ‘s fault, she is pushing the limits. :smiling_face:

1 Like

I am experiencing the same as @abaer describes in (6), however I have no complex filters on the Default View (but this one fails with this exact error) and I do have complex filters on other views and I am able to retrieve them through the rows API. I am confused, but then it’s good to know it’s already a known issue.

@siax84 Maybe you could share the “views“ JSON data from the Get Metadata API endpoint of your base (anonymized if necessary). That should give some information about the exact nature of the views.