Remove raw IDs from some places

This commit is contained in:
2026-03-03 17:45:50 +00:00
parent 8ea2afb259
commit 506ea8a3b8
4 changed files with 87 additions and 69 deletions

View File

@@ -79,6 +79,7 @@ class CommandRoutingSettings(LoginRequiredMixin, View):
preview_profile_id = str(request.GET.get("preview_profile_id") or "").strip()
for profile in profiles:
policies = ensure_variant_policies_for_profile(profile)
profile.show_actions_editor = str(profile.slug or "").strip() != "bp"
if str(profile.slug or "").strip() == "bp":
keys = BP_VARIANT_KEYS
else:
@@ -172,6 +173,9 @@ class CommandRoutingSettings(LoginRequiredMixin, View):
action_type="extract_bp",
defaults={"enabled": True, "position": 0},
)
# Keep legacy action rows in storage for compatibility and for
# potential reuse by non-bp commands; bp UI now relies on
# variant policies instead of exposing the generic action matrix.
CommandAction.objects.get_or_create(
profile=profile,
action_type="save_document",