Commit 69027ac7 authored by Åsmund Grammeltvedt's avatar Åsmund Grammeltvedt

Demonstrate problem with searching and relations

JOINing together all the relations excludes all records without children
from the search.
parent e16b6617
......@@ -246,6 +246,26 @@ def test_complex_searchable_list():
ok_('model3' not in data)
def test_complex_searchable_list_missing_children():
app, db, admin = setup()
Model1, Model2 = create_models(db)
view = CustomModelView(Model1, db.session,
column_searchable_list=[
'test1', 'model2.string_field'])
admin.add_view(view)
db.session.add(Model1('magic string'))
db.session.commit()
client = app.test_client()
rv = client.get('/admin/model1/?search=magic')
data = rv.data.decode('utf-8')
ok_('magic string' in data)
def test_column_filters():
app, db, admin = setup()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment