diff --git a/api/src/main/java/ca/bc/gov/educ/api/pen/replication/util/ReplicationUtils.java b/api/src/main/java/ca/bc/gov/educ/api/pen/replication/util/ReplicationUtils.java index 4e30f44..cdaec13 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/pen/replication/util/ReplicationUtils.java +++ b/api/src/main/java/ca/bc/gov/educ/api/pen/replication/util/ReplicationUtils.java @@ -35,7 +35,7 @@ public static String getBlankWhenNull(final String s) { public static void setCloseDateIfRequired(School school, SchoolMasterEntity entity){ if (StringUtils.isNotEmpty(school.getClosedDate()) && dateTimeMapper.map(school.getClosedDate()).isAfter(LocalDateTime.now())){ if(entity != null) { - school.setClosedDate(entity.getClosedDate()); + school.setClosedDate(dateTimeMapper.map(entity.getDateClosed())); }else{ school.setClosedDate(null); } @@ -45,7 +45,7 @@ public static void setCloseDateIfRequired(School school, SchoolMasterEntity enti public static void setCloseDateIfRequired(IndependentAuthority authority, AuthorityMasterEntity entity){ if (StringUtils.isNotEmpty(authority.getClosedDate()) && dateTimeMapper.map(authority.getClosedDate()).isAfter(LocalDateTime.now())){ if(entity != null) { - authority.setClosedDate(entity.getClosedDate()); + authority.setClosedDate(dateTimeMapper.map(entity.getDateClosed())); }else{ authority.setClosedDate(null); }