Whenever i try to save changes to a specific dashboard, it refuses to save, giving out the message ‘Save Failed’
when i checked the logs this was the error message
{:via
[{:type clojure.lang.ExceptionInfo,
:message
"ERROR: insert or update on table \"parameter_card\" violates foreign key constraint \"fk_parameter_card_ref_card_id\"\n Detail: Key (card_id)=(975) is not present in table \"report_card\".",
:data
{:toucan2/context-trace
[["execute SQL with class com.mchange.v2.c3p0.impl.NewProxyConnectionJdbc43Full"
{:toucan2.jdbc.query/sql-args
["INSERT INTO \"parameter_card\" (\"parameterized_object_id\", \"parameterized_object_type\", \"parameter_id\", \"card_id\", \"updated_at\", \"created_at\") VALUES (?, ?, ?, ?, NOW(), NOW())"
72
"dashboard"
"17170fd"
975]}]
["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}]
["resolve connection" {:toucan2.connection/connectable nil}]
{:toucan2.pipeline/rf
#object[clojure.core$completing$fn__8562 0x2550cab5 "clojure.core$completing$fn__8562@2550cab5"]}
["with compiled query"
{:toucan2.pipeline/compiled-query
["INSERT INTO \"parameter_card\" (\"parameterized_object_id\", \"parameterized_object_type\", \"parameter_id\", \"card_id\", \"updated_at\", \"created_at\") VALUES (?, ?, ?, ?, NOW(), NOW())"
72
"dashboard"
"17170fd"
975]}]
["with built query"
{:toucan2.pipeline/built-query
{:insert-into [:parameter_card],
:values
((toucan2.instance/instance
:model/ParameterCard
{:parameterized_object_id 72,
:parameterized_object_type "dashboard",
:parameter_id "17170fd",
:card_id 975,
:updated_at [:metabase.util.honey-sql-2/typed :%now {:database-type "timestamptz"}],
:created_at [:metabase.util.honey-sql-2/typed :%now {:database-type "timestamptz"}]}))}}]
["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}]
["resolve connection" {:toucan2.connection/connectable nil}]
["with resolved query" {:toucan2.pipeline/resolved-query {}}]
["with parsed args"
{:toucan2.pipeline/query-type :toucan.query-type/insert.update-count,
:toucan2.pipeline/parsed-args
{:rows
[{:parameterized_object_id 72,
:parameterized_object_type "dashboard",
:parameter_id "17170fd",
:card_id 975}]}}]
["with model" {:toucan2.pipeline/model :model/ParameterCard}]
["with unparsed args"
{:toucan2.pipeline/query-type :toucan.query-type/insert.update-count,
:toucan2.pipeline/unparsed-args
(:model/ParameterCard
{:parameterized_object_id 72, :parameterized_object_type "dashboard", :parameter_id "17170fd", :card_id 975})}]
["execute SQL with class com.mchange.v2.c3p0.impl.NewProxyConnectionJdbc43Full"
{:toucan2.jdbc.query/sql-args ["SELECT * FROM \"report_dashboard\" WHERE \"id\" = ?" 72]}]
["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}]
["resolve connection" {:toucan2.connection/connectable nil}]
{:toucan2.pipeline/rf
#object[clojure.core$map$fn__5952$fn__5953 0x73bd08e2 "clojure.core$map$fn__5952$fn__5953@73bd08e2"]}
["with compiled query"
{:toucan2.pipeline/compiled-query ["SELECT * FROM \"report_dashboard\" WHERE \"id\" = ?" 72]}]
["with built query"
{:toucan2.pipeline/built-query {:select [:*], :from [[:report_dashboard]], :where [:= :id 72]}}]
["apply before-update to matching rows"
{:toucan2.tools.before-update/model :model/Dashboard,
:toucan2.tools.before-update/changes
{:description nil,
:archived false,
:collection_position nil,
:enable_embedding false,
:collection_id 8,
:show_in_getting_started false,
:name "Dashboard 1 ",
:width "full",
:cache_ttl nil,
:position nil,
:archiv...
Also here is the diagnostic info:
{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0",
"vendor": "Google Inc."
},
"metabase-info": {
"databases": [
"h2",
"mysql"
],
"run-mode": "prod",
"plan-alias": "",
"version": {
"date": "2025-12-11",
"tag": "v0.57.6",
"hash": "e9e9771"
},
"settings": {
"report-timezone": "Africa/Cairo"
},
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "16.11"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.7.7"
}
}
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "21.0.7+6-Ubuntu-0ubuntu120.04",
"java.vendor": "Ubuntu",
"java.vendor.url": "https://ubuntu.com/",
"java.version": "21.0.7",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "21.0.7+6-Ubuntu-0ubuntu120.04",
"os.name": "Linux",
"os.version": "5.4.0-216-generic",
"user.language": "en",
"user.timezone": "Etc/UTC"
}
}