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
(parent:
014d893
)
After adding the record to the plc db, check if the record exists in sfa db. sfa...
author
Tony Mack
<tmack@cs.princeton.edu>
Mon, 10 Aug 2009 18:19:42 +0000
(18:19 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Mon, 10 Aug 2009 18:19:42 +0000
(18:19 +0000)
sfa/methods/register.py
patch
|
blob
|
history
diff --git
a/sfa/methods/register.py
b/sfa/methods/register.py
index
ef4f186
..
00ec075
100644
(file)
--- a/
sfa/methods/register.py
+++ b/
sfa/methods/register.py
@@
-119,7
+119,11
@@
class register(Method):
else:
raise UnknownGeniType(type)
- table.insert(record)
+ # SFA upcalls may exist in PLCAPI and they could have already added the
+ # record for us. Lets check if the record already exists
+ existing_records = table.resolve(type, name)
+ if not existing_records:
+ table.insert(record)
# update membership for researchers, pis, owners, operators
self.api.update_membership(None, record)