Skip to content

Commit

Permalink
v2.0.3.0030
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-mei committed Sep 7, 2019
1 parent 81e8ae3 commit 11453c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ func saveFilter(request RequestStruct) (settings SettingsStrcut, err error) {
var filterMap = make(map[int64]interface{})
var newData = make(map[int64]interface{})
var defaultFilter FilterStruct
var newFilter = false

defaultFilter.Active = true
defaultFilter.CaseSensitive = false
Expand All @@ -389,6 +390,7 @@ func saveFilter(request RequestStruct) (settings SettingsStrcut, err error) {
if dataID == -1 {

// Neuer Filter
newFilter = true
dataID = createNewID()
filterMap[dataID] = jsonToMap(mapToJSON(defaultFilter))

Expand All @@ -406,15 +408,20 @@ func saveFilter(request RequestStruct) (settings SettingsStrcut, err error) {
if filter, ok := data.(map[string]interface{})["filter"].(string); ok {

if len(filter) == 0 {

err = errors.New(getErrMsg(1014))
delete(filterMap, dataID)
if newFilter == true {
delete(filterMap, dataID)
}

return
}

}

var oldData = filterMap[dataID].(map[string]interface{})
oldData[key] = value
if oldData, ok := filterMap[dataID].(map[string]interface{}); ok {
oldData[key] = value
}

}

Expand Down
2 changes: 1 addition & 1 deletion xteve.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var GitHub = GitHubStruct{Branch: "master", User: "xteve-project", Repo: "xTeVe-
const Name = "xTeVe"

// Version : Version, die Build Nummer wird in der main func geparst.
const Version = "2.0.2.0023"
const Version = "2.0.3.0030"

// DBVersion : Datanbank Version
const DBVersion = "2.0.0"
Expand Down

0 comments on commit 11453c6

Please sign in to comment.