diff --git a/internal/xsql/legacy/tx.go b/internal/xsql/legacy/tx.go index 7aba57197..7aebf4fb4 100644 --- a/internal/xsql/legacy/tx.go +++ b/internal/xsql/legacy/tx.go @@ -20,6 +20,9 @@ type transaction struct { } func (tx *transaction) ID() string { + if tx.tx == nil { + return "" + } return tx.tx.ID() } diff --git a/internal/xsql/tx.go b/internal/xsql/tx.go index 35a395e78..ee6b41c73 100644 --- a/internal/xsql/tx.go +++ b/internal/xsql/tx.go @@ -18,6 +18,9 @@ type Tx struct { } func (tx *Tx) ID() string { + if tx.tx == nil { + return "" + } return tx.tx.ID() }