93166927fccf9b848073b06e239a17e70aaa8886
braney
  Thu Jul 17 11:48:55 2025 -0700
oops, I wasn't dealing with the no cart variable case.  Return the funky
scoring method for choosing default when no cart variables exist

diff --git src/hg/hgLiftOver/hgLiftOver.c src/hg/hgLiftOver/hgLiftOver.c
index b9dba277453..e188bdd2698 100644
--- src/hg/hgLiftOver/hgLiftOver.c
+++ src/hg/hgLiftOver/hgLiftOver.c
@@ -426,30 +426,35 @@
 cartOrg = hOrganism(cartDb);
 
 if (sameWord(fromOrg,"0"))
     fromOrg = NULL;
 if (sameWord(fromDb,"0"))
     fromDb = NULL;
 if (sameWord(toOrg,"0"))
     toOrg = NULL;
 if (sameWord(toDb,"0"))
     toDb = NULL;
 if (sameWord(cartDb,"0"))
     cartDb = NULL;
 
 for (this = chainList; this != NULL; this = this->next)
     {
+    if (sameOk(this->fromDb ,fromDb) && sameOk(this->toDb, toDb))
+        {
+        choice = this;
+        break;
+        }
     double score = scoreLiftOverChain(this, fromOrg, fromDb, toOrg, toDb, cartOrg, cartDb, dbRank, dbDbHash);
     if (score > bestScore)
 	{
 	choice = this;
 	bestScore = score;
 	}
     }
 
 return choice;
 }
 
 
 void doMiddle(struct cart *theCart)
 /* Set up globals and make web page */
 {