git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed: encodes boolean and double type values for the requests
[plcapi.git]
/
db-config.d
/
001-admin_user
diff --git
a/db-config.d/001-admin_user
b/db-config.d/001-admin_user
index
6532530
..
74a9723
100644
(file)
--- a/
db-config.d/001-admin_user
+++ b/
db-config.d/001-admin_user
@@
-2,15
+2,16
@@
####################
# Create/update the default administrator account (should be person_id 2).
####################
# Create/update the default administrator account (should be person_id 2).
-admin = { 'person_id': 2,
-
'first_name': "Default",
+the_admin_id=2
+
admin = {
'first_name': "Default",
'last_name': "Administrator",
'email': plc['root_user'],
'password': plc['root_password'] }
'last_name': "Administrator",
'email': plc['root_user'],
'password': plc['root_password'] }
-persons = GetPersons(
[admin['person_id']]
)
+persons = GetPersons(
the_admin_id
)
if not persons:
if not persons:
+ # AddPerson won't let you pass a person_id
person_id = AddPerson(admin)
person_id = AddPerson(admin)
- if person_id !=
admin['person_id']
:
+ if person_id !=
the_admin_id
:
# Huh? Someone deleted the account manually from the database.
DeletePerson(person_id)
raise Exception, "Someone deleted the \"%s %s\" account from the database!" % \
# Huh? Someone deleted the account manually from the database.
DeletePerson(person_id)
raise Exception, "Someone deleted the \"%s %s\" account from the database!" % \