Changeset 0.28.0.1 (#173)
This commit is contained in:
@@ -77,13 +77,17 @@ func (h *WorkflowEntryHandler) StartVisitor(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Set workflow columns
|
||||
allowAnonVal := interface{}(true)
|
||||
if database.CurrentDialect == database.DialectSQLite {
|
||||
allowAnonVal = 1
|
||||
}
|
||||
_, err = database.DB.ExecContext(ctx, database.Q(`
|
||||
UPDATE channels
|
||||
SET workflow_id = $1, workflow_version = $2, current_stage = 0,
|
||||
stage_data = '{}', workflow_status = 'active',
|
||||
last_activity_at = $3, allow_anonymous = true, ai_mode = 'auto'
|
||||
WHERE id = $4
|
||||
`), wf.ID, ver.VersionNumber, time.Now().UTC(), ch.ID)
|
||||
last_activity_at = $3, allow_anonymous = $4, ai_mode = 'auto'
|
||||
WHERE id = $5
|
||||
`), wf.ID, ver.VersionNumber, time.Now().UTC(), allowAnonVal, ch.ID)
|
||||
if err != nil {
|
||||
log.Printf("Failed to set workflow columns: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user