Merge pull request #313 from Frankkkkk/master

Fix race condition when getting column keys of new table
This commit is contained in:
Friedrich Lindenberg 2020-02-24 15:46:04 +01:00 committed by GitHub
commit 7291cf5ca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,8 +57,10 @@ class Table(object):
if not self.exists:
return {}
if self._columns is None:
# Initialise the table if it doesn't exist
table = self.table
self._columns = {}
for column in self.table.columns:
for column in table.columns:
name = normalize_column_name(column.name)
key = normalize_column_key(name)
if key in self._columns: