mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
fix domain store nil pointer
This commit is contained in:
@@ -4693,7 +4693,7 @@ func (s *SqlStore) GetAccountReverseProxies(ctx context.Context, lockStrength Lo
|
|||||||
func (s *SqlStore) GetCustomDomain(ctx context.Context, accountID string, domainID string) (*domain.Domain, error) {
|
func (s *SqlStore) GetCustomDomain(ctx context.Context, accountID string, domainID string) (*domain.Domain, error) {
|
||||||
tx := s.db
|
tx := s.db
|
||||||
|
|
||||||
var customDomain *domain.Domain
|
customDomain := &domain.Domain{}
|
||||||
result := tx.Take(&customDomain, accountAndIDQueryCondition, accountID, domainID)
|
result := tx.Take(&customDomain, accountAndIDQueryCondition, accountID, domainID)
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
||||||
|
|||||||
Reference in New Issue
Block a user