Fix list out of range (#425)
This commit is contained in:
committed by
GitHub
parent
3debd0c750
commit
4ce12751a5
@@ -301,7 +301,7 @@ class PostgreSQLProvider(BaseProvider):
|
||||
Identifier(self.id_field),
|
||||
), (identifier,))
|
||||
item = cursor.fetchall()
|
||||
id_ = item[0]['id']
|
||||
id_ = item[0]['id'] if item else identifier
|
||||
return id_
|
||||
|
||||
def get_next(self, cursor, identifier):
|
||||
@@ -320,7 +320,7 @@ class PostgreSQLProvider(BaseProvider):
|
||||
Identifier(self.id_field),
|
||||
), (identifier,))
|
||||
item = cursor.fetchall()
|
||||
id_ = item[0]['id']
|
||||
id_ = item[0]['id'] if item else identifier
|
||||
return id_
|
||||
|
||||
def get(self, identifier):
|
||||
|
||||
Reference in New Issue
Block a user