Skip to content

Commit

Permalink
Merge PR #121 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed May 21, 2024
2 parents 10207ec + 3cdd3da commit 1282174
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resource_booking/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ def _get_booking_sudo(self, booking_id, access_token):
def _prepare_home_portal_values(self, counters):
"""Compute values for multi-booking portal views."""
values = super()._prepare_home_portal_values(counters)
booking_count = request.env["resource.booking"].search_count([])
values.update({"booking_count": booking_count})
if "booking_count" in counters:
booking_count = request.env["resource.booking"].search_count([])
values.update({"booking_count": booking_count})
return values

def _booking_get_page_view_values(self, booking_sudo, access_token, **kwargs):
Expand Down

0 comments on commit 1282174

Please sign in to comment.