In TabularToolDataTable use .get_fields() instead of .data directly.

This commit is contained in:
Daniel Blankenberg
2014-06-13 16:09:53 -04:00
parent 54fced6483
commit d062d52638
+3 -3
View File
@@ -335,7 +335,7 @@ class TabularToolDataTable( ToolDataTable ):
return rval
def get_version_fields( self ):
return ( self._loaded_content_version, self.data )
return ( self._loaded_content_version, self.get_fields() )
def parse_column_spec( self, config_element ):
"""
@@ -422,7 +422,7 @@ class TabularToolDataTable( ToolDataTable ):
return default
rval = default
# Look for table entry.
for fields in self.data:
for fields in self.get_fields():
if fields[ query_col ] == query_val:
rval = fields[ return_col ]
break
@@ -444,7 +444,7 @@ class TabularToolDataTable( ToolDataTable ):
is_error = False
if self.largest_index < len( fields ):
fields = self._replace_field_separators( fields )
if fields not in self.data or allow_duplicates:
if fields not in self.get_fields() or allow_duplicates:
self.data.append( fields )
else:
log.debug( "Attempted to add fields (%s) to data table '%s', but this entry already exists and allow_duplicates is False.", fields, self.name )