File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ type Project struct {
9
9
ID int `db:"id" json:"id" backup:"-"`
10
10
Name string `db:"name" json:"name" binding:"required"`
11
11
Created time.Time `db:"created" json:"created" backup:"-"`
12
- Alert bool `db:"alert" json:"alert"`
13
- AlertChat * string `db:"alert_chat" json:"alert_chat"`
14
- MaxParallelTasks int `db:"max_parallel_tasks" json:"max_parallel_tasks"`
12
+ Alert bool `db:"alert" json:"alert,omitempty "`
13
+ AlertChat * string `db:"alert_chat" json:"alert_chat,omitempty "`
14
+ MaxParallelTasks int `db:"max_parallel_tasks" json:"max_parallel_tasks,omitempty "`
15
15
Type string `db:"type" json:"type"`
16
16
}
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ export default {
56
56
getSingleItemUrl () {
57
57
return ` /api/project/${ this .itemId } ` ;
58
58
},
59
+ beforeSave () {
60
+ if (this .item .max_parallel_tasks === ' ' ) {
61
+ this .item .max_parallel_tasks = 0 ;
62
+ }
63
+ },
59
64
},
60
65
};
61
66
</script >
You can’t perform that action at this time.
0 commit comments