Philipp Hörist pushed to branch storage at gajim / gajim
Commits:
256b0a30 by Philipp Hörist at 2023-06-20T20:43:57+02:00
fix upsert
- - - - -
1 changed file:
- gajim/common/storage/archive2/storage.py
Changes:
=====================================
gajim/common/storage/archive2/storage.py
=====================================
@@ -440,14 +440,12 @@ def upsert_row(self, row_data: DbUpsertRowDataBase) ->
int:
values.update(foreign_keys)
log.info('Upsert into %s: %s', row_data.get_table_name(), values)
- entitykey = self._con.execute(row_data.get_upsert_stmt(),
values).fetchone()
- if entitykey is None:
+ row = self._con.execute(row_data.get_upsert_stmt(), values).fetchone()
+ if row is None:
row = self._con.execute(row_data.get_select_stmt(),
values).fetchone()
- entitykey = row.entitykey
- print('select executed')
self._delayed_commit()
- return entitykey
+ return row.entitykey
@timeit
def set_message_error(self,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/256b0a30c7de7b6e77f8dc1351a86fdead714ba7
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/256b0a30c7de7b6e77f8dc1351a86fdead714ba7
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]