bugfix: All previous entity files are removed when file is updated

This commit is contained in:
jamesread
2024-02-25 00:01:51 +00:00
parent f3934b1906
commit 0ec2e7069b
2 changed files with 10 additions and 0 deletions

View File

@@ -150,6 +150,8 @@ func loadEntityFileYaml(filename string, entityname string) {
func updateEvmFromFile(entityname string, data []map[string]string) {
count := len(data)
sv.RemoveKeysThatStartWith("entities." + entityname)
sv.Contents["entities."+entityname+".count"] = fmt.Sprintf("%v", count)
for i, mapp := range data {