Skip to content

Commit

Permalink
Add game name to search queries filtering by game
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Jan 28, 2024
1 parent 8aa596b commit 3f2960e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/querybuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from flask import abort, current_app, request
from flask_babel import lazy_gettext
from flask_babel import lazy_gettext, gettext
from sqlalchemy import or_
from sqlalchemy.orm import subqueryload
from sqlalchemy.sql.expression import func
Expand Down Expand Up @@ -49,6 +49,9 @@ def title(self):
if self.search:
ret = f"{self.search} - {ret}"

if self.game:
ret = gettext("%(package_type)s for %(game_name)s", package_type=ret, game_name=self.game.title)

return ret

@property
Expand Down

0 comments on commit 3f2960e

Please sign in to comment.