fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-teller] 07/30: use today of last modified is not available
Date Mon, 22 Jan 2018 15:32:05 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-teller.git

commit 52d94ef1b60bfdf6d961975e15552d0883563d42
Author: mgeiss <mgeiss@mifos.org>
AuthorDate: Mon Jun 12 06:30:22 2017 +0200

    use today of last modified is not available
---
 .../teller/service/internal/service/TellerManagementService.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/service/src/main/java/io/mifos/teller/service/internal/service/TellerManagementService.java
b/service/src/main/java/io/mifos/teller/service/internal/service/TellerManagementService.java
index ceb497a..c90d2ba 100644
--- a/service/src/main/java/io/mifos/teller/service/internal/service/TellerManagementService.java
+++ b/service/src/main/java/io/mifos/teller/service/internal/service/TellerManagementService.java
@@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
+import java.time.Clock;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
@@ -73,7 +74,8 @@ public class TellerManagementService {
     optionalTellerEntity.ifPresent(tellerEntity -> {
 
       final String accountIdentifier = tellerEntity.getTellerAccountIdentifier();
-      final LocalDateTime lastModifiedOn = tellerEntity.getLastModifiedOn();
+      final LocalDateTime lastModifiedOn =
+          tellerEntity.getLastModifiedOn() != null ? tellerEntity.getLastModifiedOn() : LocalDateTime.now(Clock.systemUTC());
       final LocalDateTime startDate = lastModifiedOn.withHour(0).withMinute(0).withSecond(0).withNano(0);
       final LocalDateTime endDate = lastModifiedOn.withHour(23).withMinute(59).withSecond(59).withNano(999);
       final String dateRange =

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message