Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookings empty query #226

Merged
merged 9 commits into from
Feb 24, 2025
Merged

Bookings empty query #226

merged 9 commits into from
Feb 24, 2025

Conversation

folix-01
Copy link
Member

Return 400 if empty query was passed to @bookings endpoint

@folix-01 folix-01 requested a review from cekk February 19, 2025 10:38
@@ -87,6 +95,9 @@ def query(self):
if review_state:
query["review_state"] = review_state

if len(query) <= empty_query_len:
raise BadRequest(_("No search parameters were passed."))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want to translate this message, you have to wrap it into a api.portal.translate:

api.portal.translate(_("No search parameters were passed."))

and i don't see updated *po files

Copy link
Member Author

@folix-01 folix-01 Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need translation right now but the code is adaptable for translation if needed in future

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a msgid, please..after that, i can approve it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fatto

@coveralls
Copy link

coveralls commented Feb 19, 2025

Pull Request Test Coverage Report for Build 13498751521

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 75.409%

Totals Coverage Status
Change from base Build 13034818321: 0.04%
Covered Lines: 4149
Relevant Lines: 5502

💛 - Coveralls

@folix-01 folix-01 requested a review from cekk February 19, 2025 11:19
@folix-01
Copy link
Member Author

@cekk rw pls

@folix-01 folix-01 merged commit b468054 into main Feb 24, 2025
16 checks passed
@folix-01 folix-01 deleted the bookings_empty_query branch February 24, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants