- log event if .message attribute is set
[plcapi.git] / PLC / Persons.py
index e8243cd..541c608 100644 (file)
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: Persons.py,v 1.29 2007/01/08 16:34:12 tmack Exp $
+# $Id: Persons.py,v 1.31 2007/01/09 16:22:49 mlhuang Exp $
 #
 
 from types import StringTypes
@@ -94,7 +94,7 @@ class Person(Row):
         rest = email[at_sign+1:]
         domain = rest.split('.')
 
-        # This means local, unqualified addresses, are no allowed
+        # This means local, unqualified addresses, are not allowed
         if not domain:
             raise invalid_email
         if len(domain) < 2:
@@ -299,17 +299,12 @@ class Persons(Table):
     database.
     """
 
-    def __init__(self, api, person_filter = None, columns = None, peer_id = None):
+    def __init__(self, api, person_filter = None, columns = None):
         Table.__init__(self, api, Person, columns)
 
         sql = "SELECT %s FROM view_persons WHERE deleted IS False" % \
               ", ".join(self.columns)
 
-        if peer_id is None:
-            sql += " AND peer_id IS NULL"
-        elif isinstance(peer_id, (int, long)):
-            sql += " AND peer_id = %d" % peer_id
-
         if person_filter is not None:
             if isinstance(person_filter, (list, tuple, set)):
                 # Separate the list into integers and strings
@@ -320,4 +315,5 @@ class Persons(Table):
             elif isinstance(person_filter, dict):
                 person_filter = Filter(Person.fields, person_filter)
                 sql += " AND (%s)" % person_filter.sql(api, "AND")
+
         self.selectall(sql)