mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
In TabularToolDataTable use .get_fields() instead of .data directly.
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user