Skip to content

Commit

Permalink
snakecase SoC update + change log
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared-Newell-Mobility committed Nov 13, 2023
1 parent 7e14b16 commit 487b633
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change log


- [#523](https://github.com/mobilityhouse/ocpp/issues/523) The serialisation of soc to SoC should not occur in camel case if it is existing at the beginning of a field
- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics
- [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction

Expand Down
2 changes: 1 addition & 1 deletion ocpp/charge_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def snake_to_camel_case(data):
if isinstance(data, dict):
camel_case_dict = {}
for key, value in data.items():
key = key.replace("soc", "SoC")
key = key.replace("_soc", "SoC")
components = key.split("_")
key = components[0] + "".join(x[:1].upper() + x[1:] for x in components[1:])
camel_case_dict[key] = snake_to_camel_case(value)
Expand Down

0 comments on commit 487b633

Please sign in to comment.