knackpy icon indicating copy to clipboard operation
knackpy copied to clipboard

Filters require refresh=True

Open pjaol opened this issue 1 year ago • 0 comments

Part of #89

In order to query with a filter, the

app.get(object_view, filters=filter) 

requires explicitly passing refresh=True

What would help is if this line https://github.com/cityofaustin/knackpy/blob/cf236649f9347218b2f29e7babd2f531cb39fc6e/knackpy/app.py#L227 and https://github.com/cityofaustin/knackpy/blob/cf236649f9347218b2f29e7babd2f531cb39fc6e/knackpy/app.py#L232

also checked to see if filters was not None, or even easier would be to explicitly set refresh to True if filters are passed in


def get(
        self,
        identifier: str = None,
        refresh: bool = False,
        record_limit: int = None,
        filters: typing.Union[dict, list] = None,
        generate=False,
    ):
.....

if not refresh : 
    if not filters == None : 
        refresh = True


Happy to create a PR if you want one

pjaol avatar Aug 10 '23 15:08 pjaol