On 18 October 2011 13:20, Sathvik Ponangi <psath...@gmail.com> wrote:
> db(db.files.hash==name).select().first() always gives None, what's the > right way to do it? > > Thanks for your help... > .first() will only work if len(db(db.files.hash==name).select()) > 0 If you get None it means that the query did not find anything. If the query find something the length of the result will be >=1 Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)