Created
August 21, 2009 09:04
-
-
Save whilefalse/171778 to your computer and use it in GitHub Desktop.
Pymongo has some really cool auto dereferencing stuff build in. However, web.py was playing with my session object and saving back the dereferenced version. This allows me to dereference a list of DBRefs manually.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deref_list(db, list): | |
return map(lambda(ref): db.dereference(ref), list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment