Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove return types from Save #2063

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions backend/lcfs/web/api/allocation_agreement/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
allocation agreements endpoints
"""

import structlog
from typing import List, Optional, Union
from typing import List, Optional

import structlog
from fastapi import (
APIRouter,
Body,
Expand All @@ -15,26 +15,24 @@
Depends,
Query,
)
from fastapi_cache.decorator import cache

from lcfs.db import dependencies
from lcfs.web.api.compliance_report.validation import ComplianceReportValidation
from lcfs.web.core.decorators import view_handler
from lcfs.web.api.organizations.services import OrganizationsService
from lcfs.web.api.allocation_agreement.services import AllocationAgreementServices
from lcfs.db.models.user.Role import RoleEnum
from lcfs.web.api.allocation_agreement.schema import (
AllocationAgreementCreateSchema,
AllocationAgreementOptionsSchema,
AllocationAgreementSchema,
AllocationAgreementListSchema,
DeleteAllocationAgreementResponseSchema,
PaginatedAllocationAgreementRequestSchema,
AllocationAgreementAllSchema,
OrganizationDetailsSchema,
)
from lcfs.web.api.base import ComplianceReportRequestSchema, PaginationRequestSchema
from lcfs.web.api.allocation_agreement.services import AllocationAgreementServices
from lcfs.web.api.allocation_agreement.validation import AllocationAgreementValidation
from lcfs.db.models.user.Role import RoleEnum
from lcfs.web.api.base import ComplianceReportRequestSchema, PaginationRequestSchema
from lcfs.web.api.compliance_report.validation import ComplianceReportValidation
from lcfs.web.api.organizations.services import OrganizationsService
from lcfs.web.core.decorators import view_handler

router = APIRouter()
logger = structlog.get_logger(__name__)
Expand Down Expand Up @@ -134,9 +132,6 @@ async def get_allocation_agreements_paginated(

@router.post(
"/save",
response_model=Union[
AllocationAgreementSchema, DeleteAllocationAgreementResponseSchema
],
status_code=status.HTTP_200_OK,
)
@view_handler([RoleEnum.COMPLIANCE_REPORTING, RoleEnum.SIGNING_AUTHORITY])
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/BCDataGrid/BCGridEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ export const BCGridEditor = ({
const onCellFocused = (params) => {
if (params.column) {
// Ensure the focused column is always visible
this.gridApi.ensureColumnVisible(params.column)
params.gridApi.ensureColumnVisible(params.column)

// Scroll to make focused cell align to left
const leftPos = params.column.getLeftPosition()
if (leftPos !== null) {
this.gridApi.horizontalScrollTo(leftPos)
params.gridApi.horizontalScrollTo(leftPos)
}
}
}
Expand Down