Skip to content

Commit fb4dcee

Browse files
authored
Merge pull request #30 from ConductorOne/lauren/fix-panic
fix panic
2 parents 4c43725 + 9aa931f commit fb4dcee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/connector/tickets.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ func (ln *Linear) createIssuePayloadFromTicket(ctx context.Context, ticket *v2.T
6464
// TODO(johnallers): Need to convert Int/Float fields from String
6565
if id == "priority" {
6666
if objVal, ok := val.(*v2.TicketCustomFieldObjectValue); ok {
67+
if objVal == nil {
68+
continue
69+
}
6770
intVal, err := strconv.Atoi(objVal.Id)
6871
if err != nil {
6972
return nil, fmt.Errorf("baton-linear: failed to convert priority to int: %w", err)
@@ -72,6 +75,9 @@ func (ln *Linear) createIssuePayloadFromTicket(ctx context.Context, ticket *v2.T
7275
}
7376
} else if id == "stateId" {
7477
if objVal, ok := val.(*v2.TicketCustomFieldObjectValue); ok {
78+
if objVal == nil {
79+
continue
80+
}
7581
val = objVal.Id
7682
} else if strVal, ok := val.(string); ok {
7783
// For backwards compatibility with baton-linear v0.0.11 and earlier

0 commit comments

Comments
 (0)