From 42b43913ad02dce3fa8b0507d964f0895d4e7c2f Mon Sep 17 00:00:00 2001 From: donggyu Date: Mon, 29 Apr 2024 08:06:37 +0900 Subject: [PATCH] fix to update with empty value --- internal/repository/project.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/repository/project.go b/internal/repository/project.go index 6ffc35c0..d1649eb7 100644 --- a/internal/repository/project.go +++ b/internal/repository/project.go @@ -615,7 +615,7 @@ func (r *ProjectRepository) GetProjectNamespaceByPrimaryKey(ctx context.Context, } func (r *ProjectRepository) UpdateProjectNamespace(ctx context.Context, pn *model.ProjectNamespace) error { - res := r.db.WithContext(ctx).Model(&pn).Updates(model.ProjectNamespace{Description: pn.Description, UpdatedAt: pn.UpdatedAt}) + res := r.db.WithContext(ctx).Model(&pn).Select("Description").Updates(model.ProjectNamespace{Description: pn.Description, UpdatedAt: pn.UpdatedAt}) if res.Error != nil { return res.Error }