Determine isCycleStart on importing data too
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import csvParser from 'csvtojson'
|
||||
import isObject from 'isobject'
|
||||
import { getSchema, tryToImportWithDelete, tryToImportWithoutDelete } from '../../db'
|
||||
import {
|
||||
getSchema,
|
||||
tryToImportWithDelete,
|
||||
tryToImportWithoutDelete,
|
||||
updateCycleStartsForAllCycleDays
|
||||
} from '../../db'
|
||||
import getColumnNamesForCsv from './get-csv-column-names'
|
||||
|
||||
export default async function importCsv(csv, deleteFirst) {
|
||||
@@ -49,6 +54,7 @@ export default async function importCsv(csv, deleteFirst) {
|
||||
} else {
|
||||
tryToImportWithoutDelete(cycleDays)
|
||||
}
|
||||
updateCycleStartsForAllCycleDays()
|
||||
}
|
||||
|
||||
function validateHeaders(headers) {
|
||||
|
||||
Reference in New Issue
Block a user