From fee62350bdc3c8bc2806a5909bf44e0c9b621341 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sun, 19 Dec 2021 02:01:56 +0800 Subject: [PATCH] update --- attribute/attribute.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/attribute/attribute.go b/attribute/attribute.go index 6607f3a..a322bd0 100644 --- a/attribute/attribute.go +++ b/attribute/attribute.go @@ -34,6 +34,10 @@ func Init() error { } func Add(Key, Description, Default string) error { + result := store.DB.Exec(`select "value" from "attributes" where "key" = ?`, Key) + if result.RowsAffected != 0 { + return nil + } a := &Attribute{ Key: Key, Description: Description,