Add isinstance check for sqlite3.Row.
This commit is contained in:
parent
465f22fedb
commit
4b0d50c193
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import abc
|
|||
import functools
|
||||
import random
|
||||
import re
|
||||
import sqlite3
|
||||
import typing
|
||||
|
||||
from voussoirkit import sqlhelpers
|
||||
|
@ -433,7 +434,7 @@ class DatabaseWithCaching(Database, metaclass=abc.ABCMeta):
|
|||
object_table = object_class.table
|
||||
object_cache = self.caches.get(object_class, None)
|
||||
|
||||
if isinstance(db_row, dict):
|
||||
if isinstance(db_row, (dict, sqlite3.Row)):
|
||||
object_id = db_row['id']
|
||||
else:
|
||||
object_index = self.COLUMN_INDEX[object_table]
|
||||
|
|
Loading…
Reference in a new issue