Skip to content

Commit 19a19f1

Browse files
committed
Fix lowercase normalization and missing db_session parameter
1 parent 565c903 commit 19a19f1

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

api/src/feeds/impl/licenses_api_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def get_matching_licenses(
5656
"""Get the list of matching licenses based on the provided license URL"""
5757
try:
5858
domain_matching_licenses = resolve_license(
59-
get_matching_licenses_request.license_url,
60-
db_session,
59+
license_url=get_matching_licenses_request.license_url,
60+
db_session=db_session,
6161
)
6262
return [MatchingLicenseImpl.from_domain(matching_license) for matching_license in domain_matching_licenses]
6363
except Exception as e:

api/src/shared/common/db_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,6 @@ def normalize_url_str(url: str | None) -> str:
552552
u = re.sub(r"^www\.", "", u, flags=re.I)
553553
# remove trailing slashes
554554
u = re.sub(r"/+$", "", u)
555-
if "/" in u:
556-
host, rest = u.split("/", 1)
557-
return host.lower() + "/" + rest
558555
return u.lower()
559556

560557

0 commit comments

Comments
 (0)