Skip to content

Commit

Permalink
🗑️ Clean up some validations
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreminiom committed Mar 5, 2023
1 parent 8474cb7 commit b8191cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions pkg/infra/models/jira_issue_custom_fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package models

import (
"bytes"
"fmt"
"github.com/perimeterx/marshmallow"
)

Expand Down Expand Up @@ -350,9 +349,6 @@ func ParseSprintCustomField(buffer bytes.Buffer, customField string) ([]*SprintD
if wasFound {
record.CompleteDate = completeDate
}

fmt.Print(record)

records = append(records, record)
}

Expand Down
8 changes: 2 additions & 6 deletions pkg/infra/models/sm_request_field.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ type CreateCustomerRequestPayloadScheme struct {

func (c *CreateCustomerRequestPayloadScheme) MergeFields(fields *CustomerRequestFields) (map[string]interface{}, error) {

if fields == nil {
return nil, fmt.Errorf("error, please provide a value *CustomFields pointer")
}

if len(fields.Fields) == 0 {
return nil, fmt.Errorf("error!, the Fields tag does not contains custom fields")
if fields == nil || len(fields.Fields) == 0 {
return nil, ErrNoCustomFieldError
}

//Convert the IssueScheme struct to map[string]interface{}
Expand Down

0 comments on commit b8191cb

Please sign in to comment.