title: python flask and sqlalchemy error
body: <p>i have this api developed in flask :</p>
  
  <p><a href="https://gist.github.com/scaltro/ca5a4a6256ff34a4e4163afacc95c6e0" rel="nofollow noreferrer">https://gist.github.com/scaltro/ca5a4a6256ff34a4e4163afacc95c6e0</a></p>
  
  <p>when i execute this get on api :</p>
  
  <pre><code>/api/search?query=dsadsads&amp;offset=0&amp;limit=15&amp;sort=recommended&amp;search_id=1519341673454
  </code></pre>
  
  <p>return this errror :</p>
  
  <p><a href="https://gist.github.com/scaltro/374b4303e275e17475eb0b488aa4bb64" rel="nofollow noreferrer">https://gist.github.com/scaltro/374b4303e275e17475eb0b488aa4bb64</a></p>
  
  <p>the moddels database is this :</p>
  
  <p><a href="https://gist.github.com/scaltro/37ab7d6180e88d1ae23b55142d186c39" rel="nofollow noreferrer">https://gist.github.com/scaltro/37ab7d6180e88d1ae23b55142d186c39</a></p>
  
  <p>i lose all night, i dont know where is the problem, return this error only when i use query search in get.</p>