From 8b8adc6ce964843b4e178649efcec7cb525d8fec Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 27 Feb 2007 18:46:23 +0000 Subject: [PATCH] - changed how event_objects are logged. --- PLC/Method.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/PLC/Method.py b/PLC/Method.py index 70b8b21..f671cde 100644 --- a/PLC/Method.py +++ b/PLC/Method.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Method.py,v 1.21 2007/01/16 17:04:08 mlhuang Exp $ +# $Id: Method.py,v 1.22 2007/01/19 17:49:02 tmack Exp $ # import xmlrpclib @@ -139,17 +139,16 @@ class Method: event.sync(commit = False) - if hasattr(self, 'object_ids'): - for object_id in self.object_ids: - event.add_object(object_id, commit = False) + if hasattr(self, 'event_objects') and isinstance(self.event_objects, dict): + for key in self.event_objects.keys(): + for object_id in self.event_objects[key]: + event.add_object(key, object_id, commit = False) + # Set the message for this event if hasattr(self, 'message'): event['message'] = self.message - if hasattr(self, 'object_type'): - event['object_type'] = self.object_type - # Commit event.sync() -- 2.43.0