Change user search from .one to .fine_one.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Fri, 27 Jan 2012 23:24:09 +0000 (00:24 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Mon, 12 Mar 2012 22:46:04 +0000 (23:46 +0100)
commit84812db59dcc7ba476191678a8bb0e1829f3f607
treee3b731306dc1012ce266239f3b41ba5df9fe0b5a
parentdd0799ad0a0eb4c8792906c5fb1975bea446fc66
Change user search from .one to .fine_one.

When searching for a user by username, there can either be
no result or one result. There is a unique constraint on
the db.

.one in mongokit raises an error for more than one result.
But that can't happen anyway. So no problem.

.one in sqlalchemy raises an error for more than one, but
that's not a problem anyway. It also raises an error for no
result. But no result is handled by the code anyway, so no
need to raise an exception.

.find_one doesn't raise an exception for more than one
result (no problem anyway) and just returns None for no
result. The later is handled by the code.
mediagoblin/auth/views.py