Skip to content

Instantly share code, notes, and snippets.

View zhendi's full-sized avatar

Zhendi.Wang zhendi

  • Shenzhen, China
View GitHub Profile
db.products.find(category: {$in: categories})
> db.test.insert({a:1})
> db.test.find()
{ "_id" : ObjectId("4f9b9a90b59b4d1158a2d42d"), "a" : 1 }
> db.test.insert({b:1})
> db.test.find({_id: {$in: [ObjectId("4f9b9a90b59b4d1158a2d42d")]}})
{ "_id" : ObjectId("4f9b9a90b59b4d1158a2d42d"), "a" : 1 }
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
handler.get(*groups)
File "/base/data/home/apps/v2ex/1.358042775711964017/topic.py", line 415, in get
template_values['page_description'] = topic.content[:60] + ' - ' + topic.member.username
AttributeError: 'NoneType' object has no attribute 'username'