From 86ee4f2ecbd945cc78b7572e569f4fbdaafdc1b7 Mon Sep 17 00:00:00 2001 From: "garionion (aider)" Date: Fri, 28 Feb 2025 22:17:29 +0100 Subject: [PATCH] fix: Remove unnecessary sql.NullString conversion for storage space name --- api/storage.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api/storage.go b/api/storage.go index 4b28e33..4701bc1 100644 --- a/api/storage.go +++ b/api/storage.go @@ -236,18 +236,11 @@ func (h *StorageHandler) CreateStorageSpace(c echo.Context) error { location.String = req.Location } - // Convert name to sql.NullString - var name sql.NullString - if req.Name != "" { - name.Valid = true - name.String = req.Name - } - // Create storage space err := h.db.CreateStorageSpace(ctx, db.CreateStorageSpaceParams{ Parent: parent, Location: location, - Name: name, + Name: req.Name, }) if err != nil {