Skip to content

Commit 8c152ac

Browse files
committed
A couple of Sonar issues
1 parent b309292 commit 8c152ac

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

backend/src/controller/fhir_controller.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from decimal import Decimal
77
from typing import Optional
88
from aws_lambda_typing.events import APIGatewayProxyEventV1
9-
from boto3 import client as boto3_client
109

1110
from controller.aws_apig_event_utils import get_supplier_system_header, get_path_parameter
1211
from controller.aws_apig_response_utils import create_response
@@ -30,9 +29,6 @@
3029
from parameter_parser import process_params, process_search_params, create_query_string
3130
import urllib.parse
3231

33-
sqs_client = boto3_client("sqs", region_name="eu-west-2")
34-
queue_url = os.getenv("SQS_QUEUE_URL", "Queue_url")
35-
3632

3733
def make_controller(
3834
immunization_env: str = os.getenv("IMMUNIZATION_ENV"),

backend/src/repository/fhir_batch_repository.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ def __init__(self, imms: dict, vax_type: str, supplier: str, version: int):
8787

8888

8989
class ImmunizationBatchRepository:
90-
def __init__(self):
91-
pass
9290

9391
def create_immunization(
9492
self, immunization: any, supplier_system: str, vax_type: str, table: any, is_present: bool
@@ -252,7 +250,7 @@ def _perform_dynamo_update(
252250
else Attr("PK").eq(attr.pk) & Attr("DeletedAt").not_exists()
253251
)
254252
if deleted_at_required and update_reinstated == False:
255-
ExpressionAttributeValues = {
253+
expression_attribute_values = {
256254
":timestamp": attr.timestamp,
257255
":patient_pk": attr.patient_pk,
258256
":patient_sk": attr.patient_sk,
@@ -263,7 +261,7 @@ def _perform_dynamo_update(
263261
":respawn": "reinstated",
264262
}
265263
else:
266-
ExpressionAttributeValues = {
264+
expression_attribute_values = {
267265
":timestamp": attr.timestamp,
268266
":patient_pk": attr.patient_pk,
269267
":patient_sk": attr.patient_sk,
@@ -279,7 +277,7 @@ def _perform_dynamo_update(
279277
ExpressionAttributeNames={
280278
"#imms_resource": "Resource",
281279
},
282-
ExpressionAttributeValues=ExpressionAttributeValues,
280+
ExpressionAttributeValues=expression_attribute_values,
283281
ReturnValues="ALL_NEW",
284282
ConditionExpression=condition_expression,
285283
)

0 commit comments

Comments
 (0)