addons-server icon indicating copy to clipboard operation
addons-server copied to clipboard

Handle Non-Alphanumerical Edge Cases When Searching Themes By Colour

Open chrstinalin opened this issue 1 year ago • 1 comments

Fixes: mozilla/addons#15022

Description

Moved all formatting to its own function (convert_to_hex) that either returns a valid 6-character hex string or raises a ValueError.

Context

Testing

Checklist

  • [ ] Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • [ ] Successfully verified the change locally.
  • [ ] The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • [ ] Add before and after screenshots (Only for changes that impact the UI).
  • [ ] Add or update relevant docs reflecting the changes made.

chrstinalin avatar Sep 24 '24 15:09 chrstinalin

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/olympia/search/filters.py

Function Unhandled Issue
get_es_query TypeError: hsl() takes 3 positional arguments but 4 were given /api/v5/...
Event Count: 5
get_es_query TypeError: hsl() missing 3 required positional arguments: 'r', 'g', and 'b' /...
Event Count: 1
get_es_query TypeError: hsl() missing 1 required positional argument: 'b' /api/v5/ad...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

sentry[bot] avatar Sep 24 '24 15:09 sentry[bot]