Skip to content

Commit

Permalink
Fixing decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
kjakopovic committed Nov 9, 2024
1 parent c360af5 commit 792283e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/tps/CreateNewSuperchargerInACity/lambda_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def lambda_handler(event, context):
Item={
'id': charger_id,
'city': city,
'longitude': Decimal(longitude),
'latitude': Decimal(latitude),
'longitude': Decimal(str(longitude)),
'latitude': Decimal(str(latitude)),
'charger_name': charger_name
}
)
Expand Down
4 changes: 2 additions & 2 deletions backend/tps/UpdateSuperchargerInACity/lambda_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def update_supercharger(dynamodb, charger_id, longitude, latitude, charger_name)

if longitude is not None:
update_expression += "longitude = :longitude, "
expression_attribute_values[':longitude'] = Decimal(longitude)
expression_attribute_values[':longitude'] = Decimal(str(longitude))

if latitude is not None:
update_expression += "latitude = :latitude, "
expression_attribute_values[':latitude'] = Decimal(latitude)
expression_attribute_values[':latitude'] = Decimal(str(latitude))

if charger_name is not None:
update_expression += "charger_name = :charger_name, "
Expand Down

0 comments on commit 792283e

Please sign in to comment.