Skip to content

Commit 9970162

Browse files
committed
add links: connect category filtering
1 parent dd9c3d7 commit 9970162

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

library/utils/sqlgroups.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ def construct_links_query(args, limit) -> tuple[str, dict]:
157157
m_columns = db_utils.columns(args, "media")
158158
args.table, m_columns = sql_utils.search_filter(args, m_columns)
159159

160+
if getattr(args, "category", None) and "category" in m_columns:
161+
args.filter_sql.append("and category = :category")
162+
args.filter_bindings["category"] = args.category
163+
160164
args.select = ["path"]
161165
if args.cols:
162166
args.select.extend(args.cols)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ ignore = [
144144
"N806",
145145
"PGH003",
146146
"PGH004",
147+
"PLC0415",
147148
"PLR0913",
148149
"PLW0603",
149150
"PLW2901",

0 commit comments

Comments
 (0)