97b899f21a0804a3f9e025fca3e1a785db9cb6fe
braney
  Wed Oct 19 17:18:31 2022 -0700
get the clade, org, and db dropdowns in hgTables to work with curated
hubs

diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index d4a5449..443c3ff 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -2569,42 +2569,42 @@
 char *res = NULL;
 
 sqlSafef(query, sizeof(query), "select %s from %s where name = '%s'",
       field, dbDbTable(), database);
 if (sqlQuickQuery(conn, query, buf, sizeof(buf)) != NULL)
     res = cloneString(buf);
 
 hDisconnectCentral(&conn);
 return res;
 }
 
 
 char *hDbDbOptionalField(char *database, char *field)
  /* Look up in the regular central database. */
 {
-if (trackHubDatabase(database))
+if (trackHubDatabase(database) && !hubConnectIsCurated(trackHubSkipHubName(database)))
     {
     // In dbDb the genome field is the name of the organism, but
     // genome is the name of the assembly in track hubs.
     // Since we're called from dbDb aware code, we map a request
     // for the field "genome" to "organism"
     if (sameString(field, "genome"))
 	field = "organism";
     return trackHubAssemblyField(database, field);
     }
 
-char *res = hCentralDbDbOptionalField(database, field);
+char *res = hCentralDbDbOptionalField(trackHubSkipHubName(database), field);
 
 return res;
 }
 
 char *hDbDbField(char *database, char *field)
 /* Look up field in dbDb table keyed by database.
  * Free this string when you are done. */
 {
 char *res = hDbDbOptionalField(database, field);
 if (res == NULL)
     errAbort("Can't find %s for %s", field, database);
 return res;
 }
 
 char *hDefaultPos(char *database)