From f0cb58d17328f8927f10fe6d0fde0a3fce445992 Mon Sep 17 00:00:00 2001
From: git-directory-deploy <>
Date: Wed, 27 Jan 2021 14:43:58 +0100
Subject: [PATCH] publish:  consent for load curve data and manual execution

generated from commit 1ca126af82b1ff8cf8dab48e199e0315e9dc4e80
---
 index.js | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/index.js b/index.js
index cc0b86a..77d44bf 100644
--- a/index.js
+++ b/index.js
@@ -325,12 +325,20 @@ async function isHistoryLoaded(doctype) {
   const result = await cozyClient.data.findAll(doctype)
   if (result && result.length > 0) {
     const filtered = result.filter(function(el) {
-      const elDate = moment({ year : el.year, month : el.month, day : el.day})
-      return (
-        elDate.isBefore(startLoadDate)
-      )
+      const elDate = moment({
+        year: el.year,
+        month: el.month,
+        day: el.day,
+        minute: el.minute,
+      })
+      return elDate.isBefore(startLoadDate)
     })
     if (filtered.length > 0) {
+      log('info', 'Filtered')
+      log('info', filtered[0].year)
+      log('info', filtered[0].month)
+      log('info', filtered[0].day)
+      log('info', filtered[0].minute)
       return false
     } else {
       return true
-- 
GitLab