Skip to content

Commit

Permalink
(wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed Jul 15, 2024
1 parent 8ebbb6d commit 1866e30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 5 additions & 7 deletions pkg/cmd/time-entry/defaults/set/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,21 @@ func NewCmdSet(
}

c, err := f.Client()
if err != nil {
return err
}

if changed || d.Workspace != n.Workspace {
if n.TaskID != "" && n.ProjectID == "" {
return errors.New("can't set task without project")
}

if err != nil {
return err
}

if f.Config().IsAllowNameForID() {
if n, err = updateIDsByNames(
c, n, f.Config()); err != nil {
return err
}
}

if !f.Config().IsAllowNameForID() {
} else {
if err = checkIDs(c, n); err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/time-entry/defaults/show/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ var bFalse = false
var bTrue = true

func TestNewCmdShow_ShouldPrintDefaults(t *testing.T) {

ft := func(name string,
dte defaults.DefaultTimeEntry,
args []string, expected string) {
Expand Down

0 comments on commit 1866e30

Please sign in to comment.