foreign_xrefs should be a list and not a dict anymore
[plcapi.git] / PLC / Sites.py
index 84afa16..a30c49b 100644 (file)
@@ -48,13 +48,7 @@ class Site(Row):
     foreign_fields = ['abbreviated_name', 'name', 'is_public', 'latitude', 'longitude',
                      'url', 'date_created', 'last_updated', 'max_slices', 'max_slivers',
                      ]
-    foreign_xrefs = {
-#'person_ids',
-#'slice_ids',
-#'node_ids',
-#'address_ids',
-#'pcu_ids',
-}
+    foreign_xrefs = []
 
     def validate_name(self, name):
         if not len(name):
@@ -92,6 +86,12 @@ class Site(Row):
 
         return longitude
 
+    # timestamps
+    def validate_date_created (self, timestamp):
+       return self.validate_timestamp (timestamp)
+    def validate_last_updated (self, timestamp):
+       return self.validate_timestamp (timestamp)
+
     def add_person(self, person, commit = True):
         """
         Add person to existing site.