mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #2521 from guerler/fix_viz_000
[16.04] Fix saving visualizations
This commit is contained in:
@@ -15,7 +15,7 @@ from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy import web
|
||||
from galaxy import util
|
||||
from galaxy import exceptions
|
||||
|
||||
import json
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -136,7 +136,7 @@ class VisualizationsController( BaseAPIController, UsesVisualizationMixin, Shara
|
||||
latest_config = visualization.latest_revision.config
|
||||
if( ( title != visualization.latest_revision.title ) or
|
||||
( dbkey != visualization.latest_revision.dbkey ) or
|
||||
( util.json.dumps( config ) != util.json.dumps( latest_config ) ) ):
|
||||
( json.dumps( config ) != json.dumps( latest_config ) ) ):
|
||||
revision = self.add_visualization_revision( trans, visualization, config, title, dbkey )
|
||||
rval = { 'id' : id, 'revision' : revision.id }
|
||||
|
||||
|
||||
@@ -2751,7 +2751,7 @@ def lucene_search( trans, cntrller, search_term, search_url, **kwd ):
|
||||
status = kwd.get( 'status', 'done' )
|
||||
full_url = "%s/find?%s" % ( search_url, urllib.urlencode( { "kwd" : search_term } ) )
|
||||
response = urllib2.urlopen( full_url )
|
||||
ldda_ids = util.json.loads( response.read() )[ "ids" ]
|
||||
ldda_ids = loads( response.read() )[ "ids" ]
|
||||
response.close()
|
||||
lddas = [ trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( ldda_id ) for ldda_id in ldda_ids ]
|
||||
return status, message, get_sorted_accessible_library_items( trans, cntrller, lddas, 'name' )
|
||||
|
||||
@@ -231,7 +231,7 @@ def sequences(fileh, header):
|
||||
while True:
|
||||
if fposition == header['index_offset']:
|
||||
# we have to skip the index section
|
||||
fposition += index_length
|
||||
fposition += header['index_length']
|
||||
continue
|
||||
else:
|
||||
bytes_read, seq_data = read_sequence(header=header, fileh=fileh,
|
||||
@@ -276,7 +276,7 @@ def remove_last_xmltag_in_file(fname, tag=None):
|
||||
|
||||
# we check that we're removing the asked tag
|
||||
if tag is not None and tag != last_tag:
|
||||
etxt = join('The given xml tag (', tag, ') was not the last one in the file')
|
||||
etxt = 'The given xml tag (%s) was not the last one in the file' % tag
|
||||
raise RuntimeError(etxt)
|
||||
|
||||
# while we are at it: also remove all white spaces in that line :-)
|
||||
|
||||
Reference in New Issue
Block a user