Merge pull request #19 from the-goodies/patch-1

Fix GetJobAttributes method
This commit is contained in:
Fabian Weber 2021-04-03 21:04:48 +02:00 committed by GitHub
commit 4bd0ead52d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -231,11 +231,11 @@ func (c *IPPClient) GetJobAttributes(jobID int, attributes []string) (Attributes
return nil, err
}
if len(resp.PrinterAttributes) == 0 {
if len(resp.JobAttributes) == 0 {
return nil, errors.New("server doesn't return any job attributes")
}
return resp.PrinterAttributes[0], nil
return resp.JobAttributes[0], nil
}
// GetJobs returns jobs from a printer or class