Skip to content

Instantly share code, notes, and snippets.

@whilefalse
Created August 21, 2009 09:04
Show Gist options
  • Save whilefalse/171778 to your computer and use it in GitHub Desktop.
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.
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