diff --git a/db/field.go b/db/field.go index f4e4f4a..271887d 100644 --- a/db/field.go +++ b/db/field.go @@ -81,6 +81,10 @@ func Fields(ownerId int64, moduleId int64, actionType string, values map[string] // FieldAdd adds a new field to the specified table with the given name and type. func FieldAdd(tableName string, fieldName string, fieldType string) error { + if fieldType == "label" || fieldType == "sqlValue" { + return nil + } + check, err := TableExists(tableName) if err != nil { return err diff --git a/db/search.go b/db/search.go index 217ac08..9218ac2 100644 --- a/db/search.go +++ b/db/search.go @@ -55,7 +55,7 @@ func SearchQuery(ownerId int64, tableName string, values map[string]string) (str sql = append(sql, "SELECT ejaId") - rows, err := Rows("SELECT * FROM ejaFields WHERE ejaModuleId=? ORDER BY powerList", moduleId) + rows, err := Rows("SELECT * FROM ejaFields WHERE ejaModuleId=? AND type NOT IN ('label') ORDER BY powerList", moduleId) if err != nil { return "", nil, err } diff --git a/web/assets/templates/Edit.html b/web/assets/templates/Edit.html index ea56664..d609711 100644 --- a/web/assets/templates/Edit.html +++ b/web/assets/templates/Edit.html @@ -79,7 +79,7 @@