Used for checking if a row exists in a table.
...
my_row = MyModel.db.get_by(email='me@example.com').first()
if db.exists(my_row)
respond(my_row.s())
status('Not found.', 404)
You have to use first()
since db.get_by()
returns a list* of rows.
* = Not a "normal" list, a query object.