Skip to content

Commit

Permalink
Update api/types/mfa.go
Browse files Browse the repository at this point in the history
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
  • Loading branch information
Joerger and rosstimothy authored Oct 16, 2024
1 parent dd0ccd5 commit c727a6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/types/mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ func NewMFADevice(name, id string, addedAt time.Time, device isMFADevice_Device)
LastUsed: addedAt,
Device: device,
}
return dev, dev.CheckAndSetDefaults()
if err := dev.CheckAndSetDefaults(); err != nil {
return nil, trace.Wrap(err)
}
return dev, nil
}

// setStaticFields sets static resource header and metadata fields.
Expand Down

0 comments on commit c727a6e

Please sign in to comment.