2 Commits
1.0.2 ... 1.0.3

Author SHA1 Message Date
etienne-hd
241645baae 1.0.3 2025-06-21 13:51:12 +02:00
etienne-hd
0320e2575c fix: correct raw data extraction for location and owner in Search model 2025-06-21 13:49:23 +02:00
3 changed files with 9 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
## 1.0.3
### Fixed
* Incorrect raw data extraction for location and owner in `Search.build` function
## 1.0.2
### Added
* Support for full Leboncoin URL in `client.search(url=...)`

View File

@@ -1,6 +1,6 @@
[project]
name = "lbc"
version = "1.0.2"
version = "1.0.3"
description = "Unofficial client for Leboncoin API"
readme = "README.md"
license = {text = "MIT"}

View File

@@ -38,8 +38,8 @@ class Search:
generic=raw_attribute.get("generic")
)
)
raw_location: dict = raw.get("location", {})
raw_location: dict = raw_ad.get("location", {})
location = Location(
country_id=raw_location.get("country_id"),
region_id=raw_location.get("region_id"),
@@ -55,8 +55,8 @@ class Search:
provider=raw_location.get("provider"),
is_shape=raw_location.get("is_shape")
)
raw_owner: dict = raw.get("owner", {})
raw_owner: dict = raw_ad.get("owner", {})
owner = Owner(
store_id=raw_owner.get("store_id"),
user_id=raw_owner.get("user_id"),