Searching on "Date Modified" property returns records from other tables

Clay Records
Clay Records Member Posts: 2
Photogenic First Comment
edited January 11 in General Language Questions

When I perform a search for records in a table that have the "Modified Date" property between two dates, records from tables other than the one used for the search are returned. The mistaken records' .table property incorrectly list the selected table.

def get_recently_modified_records(
    table: granta.Table,
    minimum_date: str,
    maximum_date: str,
) -> list[granta.Record]:
        f"Getting records modified between {minimum_date} and {maximum_date}"
    modified_criterion = granta.SearchCriterion(
        granta.PseudoAttributeDefinition("modifiedDate"),  # type: ignore
        (minimum_date, maximum_date),
    return table.search_for_records_where([modified_criterion, table_criterion])

Adding a new criterion for the table returns an error stating that the table name psuedo attribute cannot be used for searching.

table_criterion = granta.SearchCriterion(
        granta.PseudoAttributeDefinition("tableName"),  # type: ignore