Skip to content

Commit

Permalink
Check for duplicate column names when initialising tables #9973
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jan 30, 2013
1 parent 8e27828 commit df71d8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/tools/OmeroPy/src/omero/columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def columns2definition(cols):
for i in range(len(cols)):
column = cols[i]
instance = column.descriptor(pos=i)
if column.name in definition:
raise omero.ApiUsageException(
None, None, "Duplicate column name: %s" % column.name)
definition[column.name] = instance
# Descriptions are handled separately
return definition
Expand Down

0 comments on commit df71d8a

Please sign in to comment.