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