Skip to content

Commit

Permalink
Updating migration to correct down_revision
Browse files Browse the repository at this point in the history
  • Loading branch information
areyeslo committed Dec 11, 2024
1 parent a7e6979 commit 0253e2a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# revision identifiers, used by Alembic.
revision = "cd8698fe40e6"
down_revision = "7ae38a8413ab"
down_revision = "9206124a098b"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# revision identifiers, used by Alembic.
revision = "7ae38a8413ab"
down_revision = "9206124a098b"
down_revision = "cd8698fe40e6"
branch_labels = None
depends_on = None

Expand Down
11 changes: 8 additions & 3 deletions backend/lcfs/tests/other_uses/test_other_uses_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,14 @@ async def test_get_other_use_version_by_user(other_uses_repo, mock_db_session):
mock_other_use.version = version
mock_other_use.user_type = user_type

mock_db_session.execute.return_value.scalars.return_value.first.return_value = (
mock_other_use
)
# Set up mock result chain
mock_result = AsyncMock()
mock_result.scalars = MagicMock(return_value=mock_result)
mock_result.first = MagicMock(return_value=mock_other_use)

# Configure mock db session
mock_db_session.execute = AsyncMock(return_value=mock_result)
other_uses_repo.db = mock_db_session

result = await other_uses_repo.get_other_use_version_by_user(
group_uuid, version, user_type
Expand Down
2 changes: 1 addition & 1 deletion backend/lcfs/web/api/other_uses/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ async def get_other_use_version_by_user(
)

result = await self.db.execute(query)
return await result.scalars().first()
return result.scalars().first()

@repo_handler
async def get_formatted_fuel_types(self) -> List[Dict[str, Any]]:
Expand Down

0 comments on commit 0253e2a

Please sign in to comment.