From fca1ae55db5ac7925010abd09188e41c10b45acf Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 21 Jul 2015 12:54:39 -0500 Subject: [PATCH] Fix missing import bug. --- tailbone/views/products.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailbone/views/products.py b/tailbone/views/products.py index d9aa3111..99381fb0 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -29,6 +29,7 @@ from __future__ import unicode_literals import os import re +import sqlalchemy as sa from sqlalchemy import orm from sqlalchemy import and_ from sqlalchemy.orm import joinedload, aliased @@ -354,7 +355,7 @@ class ProductsAutocomplete(AutocompleteView): def query(self, term): q = Session.query(model.Product).outerjoin(model.Brand) - q = q.filter(or_( + q = q.filter(sa.or_( model.Brand.name.ilike('%{0}%'.format(term)), model.Product.description.ilike('%{0}%'.format(term)))) if not self.request.has_perm('products.view_deleted'):