Skip to content

Commit

Permalink
add missing flush + delint
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Jun 24, 2024
1 parent 59c7329 commit d78c211
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions superset/commands/dashboard/permalink/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def run(self) -> str:
codec=self.codec,
key=get_deterministic_uuid(self.salt, (user_id, value)),
)
db.session.flush()
assert entry.id # for type checks
db.session.commit()
return encode_permalink_key(key=entry.id, salt=self.salt)
Expand Down
2 changes: 2 additions & 0 deletions superset/daos/key_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import logging
from datetime import datetime
from typing import Any
Expand Down
1 change: 0 additions & 1 deletion superset/extensions/metastore_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def add(self, key: str, value: Any, timeout: Optional[int] = None) -> bool:
db.session.rollback()
return False


def get(self, key: str) -> Any:
# pylint: disable=import-outside-toplevel
from superset.daos.key_value import KeyValueDAO
Expand Down

0 comments on commit d78c211

Please sign in to comment.