git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6661b4
)
- clean up person_site when deleting sites
author
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 25 Sep 2006 15:29:03 +0000
(15:29 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 25 Sep 2006 15:29:03 +0000
(15:29 +0000)
PLC/Sites.py
patch
|
blob
|
history
diff --git
a/PLC/Sites.py
b/PLC/Sites.py
index
04372c9
..
733c7c1
100644
(file)
--- a/
PLC/Sites.py
+++ b/
PLC/Sites.py
@@
-204,6
+204,12
@@
class Site(Row):
for node in nodes.values():
node.delete(commit = False)
+ # Clean up miscellaneous join tables
+ for table in ['person_site']:
+ self.api.db.do("DELETE FROM %s" \
+ " WHERE site_id = %d" % \
+ (table, self['site_id']), self)
+
# Mark as deleted
self['deleted'] = True
self.sync(commit)