Skip to content

Commit

Permalink
Fix some migration crashes due to missing source contexts
Browse files Browse the repository at this point in the history
A None check was added by #5693, so just extract that.

Fixes #6187.
  • Loading branch information
msullivan committed Oct 12, 2023
1 parent dff90f6 commit 49aaa57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edb/errors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ def set_hint_and_details(self, hint, details=None):
def has_source_context(self):
return FIELD_DETAILS in self._attrs

def set_source_context(self, context):
def set_source_context(self, context: Optional[pctx.ParserContext]):
if not context:
return

start = context.start_point
end = context.end_point
ex.replace_context(self, context)
Expand Down

0 comments on commit 49aaa57

Please sign in to comment.