diff --git a/core/db/models/project_state.py b/core/db/models/project_state.py index d36fde6cd3..9c4f68d169 100644 --- a/core/db/models/project_state.py +++ b/core/db/models/project_state.py @@ -1,6 +1,6 @@ from copy import deepcopy from datetime import datetime -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Optional, Union from uuid import UUID, uuid4 from sqlalchemy import ForeignKey, UniqueConstraint, delete, inspect @@ -365,7 +365,7 @@ class ProjectState(Base): return None - def get_file_content_by_path(self, path: str) -> FileContent | str: + def get_file_content_by_path(self, path: str) -> Union[FileContent, str]: """ Get a file from the current project state, by the file path.