Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters require refresh=True #116

Open
pjaol opened this issue Aug 10, 2023 · 0 comments
Open

Filters require refresh=True #116

pjaol opened this issue Aug 10, 2023 · 0 comments

Comments

@pjaol
Copy link

pjaol commented Aug 10, 2023

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

if self.records.get(container_key) and not refresh:

and
if not self.data.get(container_key) or refresh:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant