mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-17 06:27:53 +08:00
Missed a return on exception
This commit is contained in:
@@ -48,11 +48,11 @@ def call_hook(sender, instance, **kwargs):
|
||||
f = getattr(m, func)
|
||||
except (ValueError, ImportError, AttributeError):
|
||||
logger.error(_('malformed return hook \'{}\' for {}').format(instance.hook, instance.name))
|
||||
return
|
||||
try:
|
||||
f(instance)
|
||||
except Exception as e:
|
||||
logger.error(_('return hook {} failed on {}').format(instance.hook, instance.name))
|
||||
logger.exception(e)
|
||||
logger.error(_('return hook {} failed on {} because {}').format(instance.hook, instance.name, e))
|
||||
|
||||
|
||||
class SuccessManager(models.Manager):
|
||||
|
||||
Reference in New Issue
Block a user