Skip to content

Conversation

@Pietfried
Copy link
Contributor

@Pietfried Pietfried commented Nov 19, 2024

Describe your changes

Fixed issue that other charging profiles were cleared even when a profile id was specified

Issue ticket number and link

Checklist before requesting a review

…file id was specified

Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
@Pietfried Pietfried added bug Something isn't working OCPP1.6 labels Nov 19, 2024
} else if (this->smart_charging_handler->clear_all_profiles_with_filter(
} else if (!call.msg.id and
this->smart_charging_handler->clear_all_profiles_with_filter(
call.msg.id, call.msg.connectorId, call.msg.stackLevel, call.msg.chargingProfilePurpose, false)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since call.msg.id must be std::nullopt (because of the!call.msg.id in the if) at this point maybe you can directly pass std::nullopt for call.msg.if` here which would make this a bit more readable

Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
@Pietfried Pietfried merged commit c9a6f45 into main Nov 21, 2024
8 checks passed
@Pietfried Pietfried deleted the bugfix/clear-charging-profile branch November 21, 2024 15:56
Pietfried added a commit that referenced this pull request Nov 25, 2024
* Fixed issue that other charging profiles were cleared even when a profile id was specified
---------

Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working OCPP1.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants