I think all you would need to do is move the lines that build the filters from `setup` into `get_filter_clause` and you'd be set.

Also, when I try to run the file by itself, I get an UnhandledHTTPRequestError which means you're probably forgetting to reload a model after disabling the glue layer.