- allow foreign keys to be blacklisted
[plcapi.git] / PLC / Method.py
index 344b95c..976dfe1 100644 (file)
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: Method.py,v 1.17 2006/11/03 23:44:51 mlhuang Exp $
+# $Id: Method.py,v 1.19 2006/11/29 17:57:27 tmack Exp $
 #
 
 import xmlrpclib
@@ -129,6 +129,7 @@ class Method:
         # Log call representation
         # XXX Truncate to avoid DoS
         event['call'] = self.name + pprint.saferepr(args)
+       event['call_name'] = self.name
 
         # Both users and nodes can call some methods
         if isinstance(self.caller, Person):
@@ -143,6 +144,10 @@ class Method:
             for object_id in self.object_ids:
                 event.add_object(object_id, commit = False)
 
+       # Get message for this event
+       if hasattr(self, 'message'):
+               event['message'] = self.message 
+       
         # Commit
         event.sync(commit = True)