Commit b4f5ed9
Olivier Gintrand
fix: tools_include/exclude filter not applied immediately on gateway edit
Bug 1 — Timing: update_gateway() applied the OLD tools_include filter
(from DB) instead of the NEW one (from the edit form) because
_apply_tool_filters was called at L2381 but gateway.tools_include was
only updated at L2515. New tools matching the updated filter were never
imported, and tools deselected by the old filter were deleted as stale.
Fix: read effective_include/exclude from gateway_update (falling back
to gateway's existing value) BEFORE calling _apply_tool_filters.
Bug 2 — Clearing: setting tools_include to None when the form field
was empty made the service skip the update (is not None check), so
a filter could never be removed once set.
Fix: admin handler defaults to [] (empty list) instead of None for
cleared fields; service converts [] to None (clear) while preserving
None as 'not provided' (keep existing).1 parent 5c661ab commit b4f5ed9
2 files changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12370 | 12370 | | |
12371 | 12371 | | |
12372 | 12372 | | |
| 12373 | + | |
12373 | 12374 | | |
12374 | | - | |
| 12375 | + | |
12375 | 12376 | | |
12376 | 12377 | | |
12377 | 12378 | | |
| |||
12380 | 12381 | | |
12381 | 12382 | | |
12382 | 12383 | | |
12383 | | - | |
| 12384 | + | |
12384 | 12385 | | |
12385 | 12386 | | |
12386 | 12387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
2380 | | - | |
2381 | | - | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2382 | 2385 | | |
2383 | 2386 | | |
2384 | 2387 | | |
| |||
2512 | 2515 | | |
2513 | 2516 | | |
2514 | 2517 | | |
| 2518 | + | |
| 2519 | + | |
2515 | 2520 | | |
2516 | | - | |
| 2521 | + | |
2517 | 2522 | | |
2518 | | - | |
| 2523 | + | |
2519 | 2524 | | |
2520 | 2525 | | |
2521 | 2526 | | |
| |||
0 commit comments