mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: Update DAOs to use singular deletion method instead of bulk (#24894)
This commit is contained in:
@@ -25,6 +25,7 @@ from zipfile import is_zipfile, ZipFile
|
||||
import prison
|
||||
import pytest
|
||||
import yaml
|
||||
from sqlalchemy import inspect
|
||||
from sqlalchemy.orm import joinedload
|
||||
from sqlalchemy.sql import func
|
||||
|
||||
@@ -153,7 +154,9 @@ class TestDatasetApi(SupersetTestCase):
|
||||
|
||||
# rollback changes
|
||||
for dataset in datasets:
|
||||
db.session.delete(dataset)
|
||||
state = inspect(dataset)
|
||||
if not state.was_deleted:
|
||||
db.session.delete(dataset)
|
||||
db.session.commit()
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user