Skip to content

Require card_id for dashboard dashcard writes - #50

Merged
alxnddr merged 2 commits into
metabase:mainfrom
cdeil:codex/require-dashboard-card-id
Sep 1, 2026
Merged

Require card_id for dashboard dashcard writes#50
alxnddr merged 2 commits into
metabase:mainfrom
cdeil:codex/require-dashboard-card-id

Conversation

@cdeil

@cdeil cdeil commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require every dashboard dashcard write to include card_id
  • continue to allow card_id: null for virtual cards
  • document the requirement and cover it with a schema regression test

This makes incomplete whole-array dashboard updates fail locally before they can create a cardless duplicate. Restoring or preserving dashcards that reference archived questions still requires a Metabase core fix.

Agent authorship

This PR and its implementation were fully written by an AI coding agent.

Testing

  • bun run check (118 test files, 1316 tests; typecheck, lint, formatting, and skill lint passed)
  • disposable Metabase v0.63.15 verification: omitted card_id exits 1 before any HTTP request

Closes #49

@alxnddr

alxnddr commented Sep 1, 2026

Copy link
Copy Markdown
Member

Hey @cdeil 👋 Thanks for the contribution! Could you please sign a Contributor License Agreement?

@cdeil

cdeil commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Just now signed the CLA

@alxnddr
alxnddr merged commit 21d2bf2 into metabase:main Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard update can silently create a cardless dashcard when card_id is omitted

2 participants