This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 5390e2d82643b652c75a5560729fb6e142f8482e
Author: Michael S. Molina <[email protected]>
AuthorDate: Wed Sep 20 13:08:07 2023 -0300

    fix: DashboardRoles cascade operation (#25349)
    
    (cherry picked from commit a971a28a3450b28151bbad3632ce2364c87df3fc)
---
 superset/models/dashboard.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py
index a88d361a0e..c7bf15fa04 100644
--- a/superset/models/dashboard.py
+++ b/superset/models/dashboard.py
@@ -130,16 +130,14 @@ DashboardRoles = Table(
     Column(
         "dashboard_id",
         Integer,
-        ForeignKey("dashboards.id"),
+        ForeignKey("dashboards.id", on_delete="CASCADE"),
         nullable=False,
-        on_delete="CASCADE",
     ),
     Column(
         "role_id",
         Integer,
-        ForeignKey("ab_role.id"),
+        ForeignKey("ab_role.id", on_delete="CASCADE"),
         nullable=False,
-        on_delete="CASCADE",
     ),
 )
 

Reply via email to