chore: simplify

This commit is contained in:
andig 2023-10-23 20:52:41 +02:00
parent 70b28f2d08
commit 95c39a3a95

View file

@ -58,8 +58,7 @@ func (lp *Loadpoint) stopSession() {
}
s.Finished = lp.clock.Now()
meterStop := lp.chargeMeterTotal()
if meterStop > 0 {
if meterStop := lp.chargeMeterTotal(); meterStop > 0 {
s.MeterStop = &meterStop
}