Version 1.2.1

parent 68a7887e
# Changelog
## Version 1.2.1
* Fix: Commenting on crashes possible again
* Fix: Module should match now correctly to signatures
## Version 1.2.0
* Add: `-config`-flag to specify config file when running CrashDragon
......
......@@ -13,7 +13,8 @@ import (
)
const VER_1_2_0 = "1.2.0"
const CUR_VER = VER_1_2_0
const VER_1_2_1 = "1.2.1"
const CUR_VER = VER_1_2_1
var wg sync.WaitGroup
......@@ -30,6 +31,9 @@ func RunMigrations() {
var Migration database.Migration
database.Db.First(&Migration, "component = 'database'")
switch Migration.Version {
case VER_1_2_1:
log.Printf("Database migration is version 1.2.1")
break
case VER_1_2_0:
log.Print("Database migration is version 1.2.0")
var Migration2 database.Migration
......@@ -44,6 +48,14 @@ func RunMigrations() {
} else {
log.Print("CrashDragon migration is version 1.2.0")
}
Migration2 = database.Migration{}
database.Db.First(&Migration2, "component = 'database'")
Migration2.Version = VER_1_2_1
database.Db.Save(&Migration2)
Migration2 = database.Migration{}
database.Db.First(&Migration2, "component = 'crashdragon'")
Migration2.Version = VER_1_2_1
database.Db.Save(&Migration2)
break
default:
log.Fatal("Database migration version unsupported...")
......
......@@ -149,9 +149,9 @@ func processReport(Report database.Report, reprocess bool) {
if Frame.File == "" && Report.Signature != "" {
continue
}
Report.Signature = Frame.Function
if Report.Module == "" {
if Report.Module == "" || (Report.Signature == "" && Frame.Function != "") {
Report.Module = strings.TrimSuffix(Frame.Module, filepath.Ext(Frame.Module))
Report.Signature = Frame.Function
}
if Frame.File == "" {
continue
......
......@@ -165,7 +165,7 @@
</div>
{{ end }}
<h3>Add comment</h3>
<form method="post" action="/crashes/{{ .ID }}/comments">
<form method="post" action="/crashes/{{ .Crash.ID }}/comments">
<div class="form-group">
<textarea class="form-control" name="comment"></textarea>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment