Skip to content

Commit

Permalink
Merge pull request #952 from Sage-Bionetworks/develop-incomplete-col
Browse files Browse the repository at this point in the history
add default max size for columns missing this key
  • Loading branch information
GiaJordan authored Oct 6, 2022
2 parents 385ac03 + 69a18d0 commit e6e97df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions schematic/store/synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ def make_synapse_table(self,

if col in table_schema_by_cname:
col_type = table_schema_by_cname[col]['columnType']
max_size = table_schema_by_cname[col]['maximumSize']
max_size = table_schema_by_cname[col]['maximumSize'] if 'maximumSize' in table_schema_by_cname[col].keys() else 100
max_list_len = 250
if max_size and max_list_len:
cols.append(Column(name=col, columnType=col_type,
Expand Down Expand Up @@ -1487,7 +1487,7 @@ def make_synapse_table(self,
for col in table_to_load.columns:
if col in table_schema_by_cname:
col_type = table_schema_by_cname[col]['columnType']
max_size = table_schema_by_cname[col]['maximumSize']
max_size = table_schema_by_cname[col]['maximumSize'] if 'maximumSize' in table_schema_by_cname[col].keys() else 100
max_list_len = 250
if max_size and max_list_len:
cols.append(Column(name=col, columnType=col_type,
Expand Down

0 comments on commit e6e97df

Please sign in to comment.