Skip to content

Commit

Permalink
Make SQL in the SQL error optional
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtemple committed Aug 17, 2023
1 parent 23dcea3 commit a0b9af3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spectacles/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(
model: str,
explore: str,
dimension: Optional[str],
sql: str,
sql: Optional[str],
message: str,
line_number: Optional[int] = None,
explore_url: Optional[str] = None,
Expand Down
4 changes: 2 additions & 2 deletions spectacles/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ErrorData(BaseModel):
class MultiErrorData(BaseModel):
id: str
runtime: float
sql: str
sql: Optional[str]
errors: Optional[Tuple[QueryError, ...]]

status: Literal["error"]
Expand All @@ -72,7 +72,7 @@ def runtime(self) -> float:
return self.data.runtime

@property
def sql(self) -> str:
def sql(self) -> Optional[str]:
return self.data.sql

@property
Expand Down

0 comments on commit a0b9af3

Please sign in to comment.