Skip to content

Commit 417be75

Browse files
committed
fix: use the same DSLContext in insertIgnoreIdTag(..)
1 parent 6022f3c commit 417be75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/de/rwth/idsg/steve/repository/impl/OcppServerRepositoryImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public Integer insertTransaction(InsertTransactionParams p) {
172172
insertIgnoreConnector(ctx, p.getChargeBoxId(), p.getConnectorId());
173173

174174
// it is important to insert idTag before transaction, since the transaction table references it
175-
boolean unknownTagInserted = insertIgnoreIdTag(p);
175+
boolean unknownTagInserted = insertIgnoreIdTag(ctx, p);
176176

177177
SelectConditionStep<Record1<Integer>> connectorPkQuery =
178178
DSL.select(CONNECTOR.CONNECTOR_PK)
@@ -290,7 +290,7 @@ private void insertIgnoreConnector(DSLContext ctx, String chargeBoxIdentity, int
290290
* is online, it sends a StartTransactionRequest with this idTag. If we do not insert this idTag, the transaction
291291
* details will not be inserted into DB and we will lose valuable information.
292292
*/
293-
private boolean insertIgnoreIdTag(InsertTransactionParams p) {
293+
private boolean insertIgnoreIdTag(DSLContext ctx, InsertTransactionParams p) {
294294
String note = "This unknown idTag was used in a transaction that started @ " + p.getStartTimestamp()
295295
+ ". It was reported @ " + DateTime.now() + ".";
296296

0 commit comments

Comments
 (0)