Commit dfb39194 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

New collaborations are not created by default.

parent 2fb29b47
......@@ -655,7 +655,6 @@ class Automaton(object):
def search_collaboration(self, value):
"""Get the database collaboration identifier using synonyms.
Create the collaboration, if it is well formed and does not exist.
Args:
value (unicode): the name of the collaboration.
......@@ -666,14 +665,12 @@ class Automaton(object):
* UNDEF_ID if value is not defined.
Raises:
ToolException: when more than one synonym is found.
ToolException: when more than one synonym is found or when the
collaboration is not defined.
"""
return search_synonym(self.db.collaborations,
"collaboration",
value,
True)
return search_synonym(self.db.collaborations, "collaboration", value)
def search_country(self, value):
"""Get the database country identifier using synonyms.
......
......@@ -156,7 +156,7 @@ def search_synonym(table, fieldname, value, create=False):
Note:
The database table must have a field name *synonyms*.
It is a string containing values separated by a comma.
It contains a list of strings.
Args:
table (gluon.DAL.Table): database table.
fieldname (unicode): field of the database table
......@@ -203,7 +203,7 @@ def search_synonym(table, fieldname, value, create=False):
elif ncount == 1:
return setrows.select(table.id).first().id
# more than one synonyms - don't know how to choose
# more than one synonyms - don't know what to choose
else:
msg = MSG_TOOMANY_SYNONYM % table._tablename
raise ToolException(msg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment