ImagesByWikiPage: protect against c.site not having _id36.

This appears to be happening in some rare corner cases because of the
wiki-embed in the registration form.
This commit is contained in:
Neil Williams
2013-08-22 00:13:49 -07:00
parent 5341ceee09
commit 0b4ac87a17

View File

@@ -421,8 +421,8 @@ class ImagesByWikiPage(tdb_cassandra.View):
@classmethod
def get_images(cls, sr, page_name):
rowkey = WikiPage.id_for(sr, page_name)
try:
rowkey = WikiPage.id_for(sr, page_name)
return cls._byID(rowkey)._values()
except tdb_cassandra.NotFound:
return {}