Skip to content

Commit fdc6050

Browse files
committed
Adjust session to use split models
1 parent 9081569 commit fdc6050

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1111
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212

1313
## Unreleased
14+
### Fixed
15+
- special fix for tracker creation to not mark not_affected_justification
16+
as mandatory, this is a temporary solution until OSIDB 4.9.0 is released
1417

1518
## [4.8.1] - 2025-03-06
1619
### Fixed

osidb_bindings/session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def __get_refresh_token(self) -> str:
310310
if isinstance(self.auth, tuple):
311311
response = auth_token_create.sync(
312312
client=self.__client,
313-
body=models.TokenObtainPair.from_dict(
313+
body=models.TokenObtainPairRequest.from_dict(
314314
{"username": self.auth[0], "password": self.auth[1]}
315315
),
316316
)
@@ -326,14 +326,14 @@ def __get_access_token(self) -> str:
326326
try:
327327
response = auth_token_refresh_create.sync(
328328
client=self.__client,
329-
body=models.TokenRefresh.from_dict({"refresh": self.refresh_token}),
329+
body=models.TokenRefreshRequest.from_dict({"refresh": self.refresh_token}),
330330
)
331331
except requests.HTTPError:
332332
# expired refresh token, renew it and try again
333333
self.refresh_token = self.__get_refresh_token()
334334
response = auth_token_refresh_create.sync(
335335
client=self.__client,
336-
body=models.TokenRefresh.from_dict({"refresh": self.refresh_token}),
336+
body=models.TokenRefreshRequest.from_dict({"refresh": self.refresh_token}),
337337
)
338338

339339
return response.access

0 commit comments

Comments
 (0)