in jbi/bugzilla/client.py [0:0]
def update_bug(self, bugid, **fields) -> Bug:
"""Update the specified fields of the specified bug."""
# https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html#rest-update-bug
url = f"{self.base_url}/rest/bug/{bugid}"
updated_info = self._call("PUT", url, json=fields)
parsed = ApiResponse.model_validate(updated_info)
if not parsed.bugs:
raise BugzillaClientError(
f"Unexpected response content from 'PUT {url}' (no 'bugs' field)"
)
return parsed.bugs[0]