@ -54,6 +54,10 @@ func Project(g *gin.RouterGroup, db database.Database) {
return nil, err
}
if project.Active && project.StatusTag != nil {
project.StatusTag = nil
return &models.ProjectResult{
Project: project,
Tasks: []*models.TaskResult{},
@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
UPDATE project SET status_tag=NULL WHERE active=true;
-- +goose StatementEnd
-- +goose Down
SELECT 'Nothing to do';
@ -47,6 +47,10 @@ func (project *Project) Update(update ProjectUpdate) {
if update.Favorite != nil {
project.Favorite = *update.Favorite
if project.StatusTag != nil && !project.Active {
type ProjectUpdate struct {
@ -53,7 +53,7 @@
stuffLogClient.createProject({
active: statusTag === "",
endTime: ( endTime == "" ) ? null : new Date(endTime),
statusTag: statusTag || null,
statusTag: statusTag !== "" ? statusTag : null,
name, description, icon, favorite,
}).then(() => {