Skip to content

Commit

Permalink
fix: Engine running check in RM (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiurin authored May 6, 2024
1 parent 0faba0e commit 330a78c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/firebolt/model/V2/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def check_attached_to_database(func: Callable) -> Callable:

@functools.wraps(func)
def inner(self: Engine, *args: Any, **kwargs: Any) -> Any:
if self.database is None:
# this check is only relevant for account version 1
if self._service.client._account_version != 2 and self.database is None:
raise NoAttachedDatabaseError(method_name=func.__name__)
return func(self, *args, **kwargs)

Expand Down

0 comments on commit 330a78c

Please sign in to comment.