Save the organization with the compliance report on creation

This avoids the problem of having to assign the compliance report later
when we get location data and image data.
This commit is contained in:
Eli Ribble 2026-04-20 16:21:08 +00:00
parent 0b32492fd6
commit ffd424df12
No known key found for this signature in database
7 changed files with 161 additions and 133 deletions

View file

@ -47,7 +47,7 @@ func SetEventChannel(chan_envelopes <-chan platform.Envelope) {
go func() {
for envelope := range chan_envelopes {
for conn, _ := range connectionsSSE {
if conn.organizationID == envelope.OrganizationID {
if conn.organizationID == envelope.OrganizationID || conn.organizationID == 0 {
log.Debug().Int("type", int(envelope.Event.Type)).Int32("env-org", envelope.OrganizationID).Msg("pushed event to client")
conn.chanEvent <- envelope.Event
} else if conn.userID == envelope.UserID {