From 8dee60d85aefa78323d6d0f66e39785911892a00 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Fri, 24 Sep 2010 14:45:22 +0000
Subject: [PATCH] similarly to what's being done on ActivityTool, also call
 setSite in AlarmTool before processing a timer

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38627 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Tool/AlarmTool.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/product/ERP5/Tool/AlarmTool.py b/product/ERP5/Tool/AlarmTool.py
index 0f32e90c98..1158b7d8ce 100644
--- a/product/ERP5/Tool/AlarmTool.py
+++ b/product/ERP5/Tool/AlarmTool.py
@@ -46,6 +46,7 @@ import re
 # minimal IP:Port regexp
 NODE_RE = re.compile('^\d+\.\d+\.\d+\.\d+:\d+$')
 
+from zope.site.hooks import setSite
 try:
   from Products.TimerService import getTimerService
 except ImportError:
@@ -210,6 +211,10 @@ class AlarmTool(BaseTool):
     if not acquired:
       return
     try:
+
+      portal = self.getPortalObject()
+      setSite(portal)
+
       # make sure our skin is set-up. On CMF 1.5 it's setup by acquisition,
       # but on 2.2 it's by traversal, and our site probably wasn't traversed
       # by the timerserver request, which goes into the Zope Control_Panel
-- 
2.30.9