mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-02-07 13:31:38 +02:00
Add missing check to permissionSchemeService.Get
There was missing a check for requests with invalid ID. Now it returns an error instead of an empty permissionScheme.
This commit is contained in:
parent
34fb356f18
commit
3a29fbf9ce
@ -61,6 +61,9 @@ func (s *PermissionSchemeService) Get(schemeID int) (*PermissionScheme, *Respons
|
||||
jerr := NewJiraError(resp, err)
|
||||
return nil, resp, jerr
|
||||
}
|
||||
if ps.Self == "" {
|
||||
return nil, resp, fmt.Errorf("No permissionscheme with ID %d found", schemeID)
|
||||
}
|
||||
|
||||
return ps, resp, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user