summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-29 21:05:47 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 12:54:55 +0200
commit2e243e03737b1d65a82a73c1469edba111cfb0b8 (patch)
treee1c2a1dd12d9dc825b86bd3724cbb392b93e9c05
parente48615157e6fc518d9800a1c17796c66295989d5 (diff)
downloadhaketilo-hydrilla-2e243e03737b1d65a82a73c1469edba111cfb0b8.tar.gz
haketilo-hydrilla-2e243e03737b1d65a82a73c1469edba111cfb0b8.zip
[proxy] never auto-activate mappings marked as "DISABLED"
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py b/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py
index b62004c..2ec3600 100644
--- a/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py
+++ b/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py
@@ -57,10 +57,11 @@ def _get_infos_of_type(cursor: sqlite3.Cursor, info_type: t.Type[AnyInfoVar],) \
ive.repo,
ive.repo_iteration
FROM
- item_versions_extra AS ive
- JOIN items AS i USING (item_id)
+ item_versions_extra AS ive
+ JOIN items AS i USING (item_id)
+ LEFT JOIN mapping_statuses AS ms USING (item_id)
WHERE
- i.type = ?;
+ i.type = ? AND COALESCE(ms.enabled != 'D', TRUE);
''',
(info_type.type.value[0].upper(),)
)