Fix insert statement

This commit is contained in:
Till Faelligen 2022-02-15 14:28:51 +01:00
parent 2fc1c46743
commit 6482630f7b
2 changed files with 4 additions and 4 deletions

View file

@ -120,9 +120,9 @@ func (s *accountsStatements) insertAccount(
var err error
if appserviceID == "" {
_, err = stmt.ExecContext(ctx, localpart, createdTimeMS, hash, nil, "")
_, err = stmt.ExecContext(ctx, localpart, createdTimeMS, hash, nil, policyVersion)
} else {
_, err = stmt.ExecContext(ctx, localpart, createdTimeMS, hash, appserviceID, policyVersion)
_, err = stmt.ExecContext(ctx, localpart, createdTimeMS, hash, appserviceID, "")
}
if err != nil {
return nil, err

View file

@ -120,9 +120,9 @@ func (s *accountsStatements) insertAccount(
var err error
if appserviceID == "" {
_, err = sqlutil.TxStmt(txn, stmt).ExecContext(ctx, localpart, createdTimeMS, hash, nil, "")
_, err = sqlutil.TxStmt(txn, stmt).ExecContext(ctx, localpart, createdTimeMS, hash, nil, policyVersion)
} else {
_, err = sqlutil.TxStmt(txn, stmt).ExecContext(ctx, localpart, createdTimeMS, hash, appserviceID, policyVersion)
_, err = sqlutil.TxStmt(txn, stmt).ExecContext(ctx, localpart, createdTimeMS, hash, appserviceID, "")
}
if err != nil {
return nil, err