You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/08/23 20:20:20 UTC

[superset] branch fix-count-meta-db updated (de9d86f055 -> 7a485ba237)

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

beto pushed a change to branch fix-count-meta-db
in repository https://gitbox.apache.org/repos/asf/superset.git


    omit de9d86f055 Fix autoincrement
     new 7a485ba237 Fix autoincrement

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (de9d86f055)
            \
             N -- N -- N   refs/heads/fix-count-meta-db (7a485ba237)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 superset/extensions/metadb.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


[superset] 01/01: Fix autoincrement

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch fix-count-meta-db
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 7a485ba23773c73a8b36994c0d28c44c7cfa4a37
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Wed Aug 23 12:43:06 2023 -0700

    Fix autoincrement
---
 superset/extensions/metadb.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/superset/extensions/metadb.py b/superset/extensions/metadb.py
index 17e9f2850c..ef2c093475 100644
--- a/superset/extensions/metadb.py
+++ b/superset/extensions/metadb.py
@@ -397,6 +397,13 @@ class SupersetShillelaghAdapter(Adapter):
                 raise ProgrammingError(f"Invalid rowid specified: {row_id}")
             row[self._rowid] = row_id
 
+        if (
+            self._rowid
+            and row[self._rowid] is None
+            and self._table.c[self._rowid].autoincrement
+        ):
+            row.pop(self._rowid)
+
         query = self._table.insert().values(**row)
 
         with self.engine_context() as engine: