aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/request.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2012-01-28 00:24:09 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2012-03-12 23:46:04 +0100
commit84812db59dcc7ba476191678a8bb0e1829f3f607 (patch)
treee3b731306dc1012ce266239f3b41ba5df9fe0b5a /mediagoblin/tools/request.py
parentdd0799ad0a0eb4c8792906c5fb1975bea446fc66 (diff)
downloadmediagoblin-84812db59dcc7ba476191678a8bb0e1829f3f607.tar.lz
mediagoblin-84812db59dcc7ba476191678a8bb0e1829f3f607.tar.xz
mediagoblin-84812db59dcc7ba476191678a8bb0e1829f3f607.zip
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.
Diffstat (limited to 'mediagoblin/tools/request.py')
0 files changed, 0 insertions, 0 deletions