Skip to content

Commit

Permalink
urllib.unquote plus for spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Oct 26, 2023
1 parent 6855353 commit 428bda4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions backend/api_app/controllers/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
def get_search_results(search_term: str) -> AppGroup:
decoded_input = urllib.parse.unquote_plus(search_term)
df = search_apps(search_input=decoded_input, limit=20)
logger.info(f"{decoded_input=} returned rows: {df.shape[0]}")
apps_dict = df.to_dict(orient="records")
app_group = AppGroup(title=search_term, apps=apps_dict)
return app_group
Expand Down
2 changes: 0 additions & 2 deletions backend/dbcon/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ def get_app_history(store_app: int) -> pd.DataFrame:
def search_apps(search_input: str, limit: int = 100):
logger.info(f"App search: {search_input=}")
search_pattern = f"%{search_input}%"

sel_query = """
SELECT
sa.*,
Expand All @@ -466,7 +465,6 @@ def search_apps(search_input: str, limit: int = 100):
)
if not df.empty:
df = clean_app_df(df)

return df


Expand Down

0 comments on commit 428bda4

Please sign in to comment.