Method to get the failure exception object for a MediaEntry, if appropriate.

This commit is contained in:
Christopher Allan Webber 2011-08-14 07:55:08 -05:00
parent e3e9b8fcc9
commit 6ee9c71902

View File

@ -297,6 +297,13 @@ class MediaEntry(Document):
def uploader(self):
return self.db.User.find_one({'_id': self['uploader']})
def get_fail_exception(self):
"""
Get the exception that's appropriate for this error
"""
if self['fail_error']:
return util.import_component(self['fail_error'])
class MediaComment(Document):
"""