fix gorm id failures

This commit is contained in:
Alisdair MacLeod
2026-01-28 13:16:47 +00:00
parent 7700b4333d
commit 10b981a855

View File

@@ -18,6 +18,7 @@ import (
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/rs/xid"
log "github.com/sirupsen/logrus"
"gorm.io/driver/mysql"
"gorm.io/driver/postgres"
@@ -4726,6 +4727,7 @@ func (s *SqlStore) ListCustomDomains(ctx context.Context, accountID string) ([]*
func (s *SqlStore) CreateCustomDomain(ctx context.Context, accountID string, domainName string, validated bool) (*domain.Domain, error) {
newDomain := &domain.Domain{
ID: xid.New().String(), // Generate our own ID because gorm doesn't always configure the database to handle this for us.
Domain: domainName,
AccountID: accountID,
Type: domain.TypeCustom,