7204d8c80f457039e942c33cb832900010a65270
braney
  Thu Feb 13 12:33:50 2025 -0800
don't create hub in hgCollection on invocation.  Wait till something
gets added to the collection.   Refs #35088

diff --git src/hg/js/hgCollection.js src/hg/js/hgCollection.js
index 4f3f48a6108..95e5645eae7 100644
--- src/hg/js/hgCollection.js
+++ src/hg/js/hgCollection.js
@@ -241,31 +241,31 @@
         var v = $(selectedTree).jstree(true).get_json('#', {flat:true, no_data:true, no_state:true, no_a_attr:true});
         var children;
         var parents = {};
         for(ii=0; ii < v.length; ii++) {
             if (v[ii].parent === '#') {
                 parents[v[ii].id] = v[ii].text;
             }
         }
         for(ii=0; ii < v.length; ii++) { 
             if (v[ii].li_attr.name === undefined) {
                 alert(parents[v[ii].parent] + " does not have any wiggles.  Not saved.");
             }
         }
         json += JSON.stringify(v);
         json += ']';
-        var requestData = 'jsonp=' + json;
+        var requestData = 'jsonp=' + json + '&hgsid=' + getHgsid();
         $.ajax({
             data:  requestData ,
             async: doAjaxAsync,
             dataType: "JSON",
             type: "PUT",
             url: "hgCollection?cmd=saveCollection",
             trueSuccess: updatePage,
             success: catchErrorOrDispatch,
             error: errorHandler,
         });
     }
 
     function saveCollections(trees) {
         // called when the "Save" button is pressed
         $("#workScreen").css("display","block");