What's Fixed
Admin — API key / downstream "Choose Systems" shows 0 talkgroups
Systems in the root config form have talkgroups lazy-loaded for performance (only populated when you open a system). The systems-selection dialog now receives the full raw systems data so all talkgroup counts and checkboxes display correctly without any change to page-load performance. The downstreams component receives the same fix.
Server — Auto-populate race condition (SQLSTATE 23503 FK violations)
When two calls arrived simultaneously for the same new talkgroup, a second goroutine could read a group or tag from the in-memory list before its DB-assigned ID had been written back, resulting in groupId = 0 being written into talkgroupGroups and causing foreign-key violations.
talkgroup.WriteTxnow skips anygroupId == 0entry, eliminating the FK errors immediatelygroup.Writecaptures the DB-assigned ID viaRETURNING "groupId"(PostgreSQL) orLastInsertId(SQLite) right after INSERT — the in-memory object carries its real ID before the write lock is releasedtag.Writereceives the same fix (RETURNING "tagId"/LastInsertId)