Skip to content

Commit

Permalink
Merge pull request #2095 from bcgov/fix/alex-notional-transfer-2073
Browse files Browse the repository at this point in the history
Fix: Notional Transfers Method Param - 2073
  • Loading branch information
AlexZorkin authored Feb 25, 2025
2 parents 23d40f3 + 95c8bca commit 3fd2a6b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions backend/lcfs/web/api/notional_transfer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async def get_notional_transfers_paginated(
)
compliance_report_id = request_data.compliance_report_id
return await service.get_notional_transfers_paginated(
pagination, compliance_report_id
pagination, compliance_report_id, request.user
)


Expand All @@ -144,8 +144,7 @@ async def get_notional_transfer(
) -> NotionalTransferSchema:
notional_transfer = await service.get_notional_transfer(notional_transfer_id)
if not notional_transfer:
raise HTTPException(
status_code=404, detail="Notional transfer not found")
raise HTTPException(status_code=404, detail="Notional transfer not found")
await report_validate.validate_organization_access(
notional_transfer.compliance_report_id
)
Expand All @@ -154,8 +153,7 @@ async def get_notional_transfer(

@router.post(
"/save",
response_model=Union[NotionalTransferSchema,
DeleteNotionalTransferResponseSchema],
response_model=Union[NotionalTransferSchema, DeleteNotionalTransferResponseSchema],
status_code=status.HTTP_200_OK,
)
@view_handler([RoleEnum.COMPLIANCE_REPORTING, RoleEnum.SIGNING_AUTHORITY])
Expand All @@ -179,9 +177,7 @@ async def save_notional_transfer_row(
status_code=403, detail="User does not have the required role."
)

await validate.validate_compliance_report_id(
compliance_report_id, [request_data]
)
await validate.validate_compliance_report_id(compliance_report_id, [request_data])
if request_data.deleted:
# Delete existing notional transfer

Expand Down

0 comments on commit 3fd2a6b

Please sign in to comment.