Skip to content

Commit

Permalink
Make ExternalTableRequest.schema non-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mildbyte committed Mar 7, 2022
1 parent 9a523d8 commit 77ae825
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion splitgraph/cloud/models.py
Expand Up @@ -244,7 +244,7 @@ class UpdateExternalCredentialResponse(BaseModel):

class ExternalTableRequest(BaseModel):
options: Dict[str, Any] = {}
schema_: Optional[Dict[str, str]] = Field(alias="schema")
schema_: Dict[str, str] = Field(alias="schema", default={})


class AddExternalRepositoryRequest(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion splitgraph/core/types.py
Expand Up @@ -95,7 +95,7 @@ def dict_to_table_schema_params(
t: (
[
TableColumn(i + 1, cname, ctype, False, None)
for (i, (cname, ctype)) in enumerate((tsp.schema_ or {}).items())
for (i, (cname, ctype)) in enumerate(tsp.schema_.items())
],
TableParams(tsp.options),
)
Expand Down

0 comments on commit 77ae825

Please sign in to comment.