Skip to content

Null error in SQL Statement #15

@lamngue

Description

@lamngue
class Product(db.model):
    __searchable__ = ['title', 'description']

    __analyzer__ = StemmingAnalyzer()
    __tablename__ = "Product"
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String(100), nullable=False)
    description = db.Column(db.Text, nullable=True)
 query = request.args.get('q', '') -> Organization
 products = Product.query.search(query, limit=num_posts)
@datapilot.before_first_request
def bootstrap():
    flask_whooshalchemy3.search_index(datapilot, Product)

The query variable is being passed but the SQL query is built into SELECT * From Product WHERE null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions