git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a91636b
)
only delete the person from plc if he/she has site ids. If he/she doesnt it probably...
author
Tony Mack
<tmack@cs.princeton.edu>
Thu, 3 Sep 2009 17:00:43 +0000
(17:00 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Thu, 3 Sep 2009 17:00:43 +0000
(17:00 +0000)
sfa/methods/remove.py
patch
|
blob
|
history
diff --git
a/sfa/methods/remove.py
b/sfa/methods/remove.py
index
c0f5c52
..
dade3fb
100644
(file)
--- a/
sfa/methods/remove.py
+++ b/
sfa/methods/remove.py
@@
-42,7
+42,10
@@
class remove(Method):
type = record['type']
if type == "user":
type = record['type']
if type == "user":
- if self.api.plshell.GetPersons(self.api.plauth, record.get_pointer()):
+ persons = self.api.plshell.GetPersons(self.api.plauth, record.get_pointer())
+ # only delete this person if he has site ids. if he doesnt, it probably means
+ # he was just removed from a site, not actually deleted
+ if persons and persons[0]['site_ids']:
self.api.plshell.DeletePerson(self.api.plauth, record.get_pointer())
elif type == "slice":
if self.api.plshell.GetSlices(self.api.plauth, record.get_pointer()):
self.api.plshell.DeletePerson(self.api.plauth, record.get_pointer())
elif type == "slice":
if self.api.plshell.GetSlices(self.api.plauth, record.get_pointer()):