Skip to content
Snippets Groups Projects
Commit f0cb58d1 authored by git-directory-deploy's avatar git-directory-deploy
Browse files

publish: consent for load curve data and manual execution

generated from commit 1ca126af
parent d99d3489
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment