Commit d99e867c authored by Vincent Pelletier's avatar Vincent Pelletier

Distinguish the case where a related key has the same name as a column from...

Distinguish the case where a related key has the same name as a column from the case where a related key is declared more than once.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25739 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 69d4ba22
......@@ -1739,8 +1739,11 @@ class Catalog(Folder,
LOG('SQLCatalog', 100, 'Malformed related key definition: %r. Ignored.' % (entire_definition, ))
continue
related_key_id = split_entire_definition[0].strip()
if related_key_id in column_set and related_key_id in column_map:
LOG('SQLCatalog', 100, 'Related key %r has the same name as an existing column on tables %r' % (related_key_id, column_map[related_key_id]))
if related_key_id in column_set:
if related_key_id in column_map:
LOG('SQLCatalog', 100, 'Related key %r has the same name as an existing column on tables %r' % (related_key_id, column_map[related_key_id]))
else:
LOG('SQLCatalog', 100, 'Related key %r is declared more than once.' % (related_key_id, )
column_set.add(related_key_id)
return column_set
......
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