Method to get the failure exception object for a MediaEntry, if appropriate.
This commit is contained in:
parent
e3e9b8fcc9
commit
6ee9c71902
@ -297,6 +297,13 @@ class MediaEntry(Document):
|
|||||||
def uploader(self):
|
def uploader(self):
|
||||||
return self.db.User.find_one({'_id': self['uploader']})
|
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):
|
class MediaComment(Document):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user