diff --git a/client/src/sagas/core/services/tasks.js b/client/src/sagas/core/services/tasks.js index cae0cd4..3129e93 100644 --- a/client/src/sagas/core/services/tasks.js +++ b/client/src/sagas/core/services/tasks.js @@ -7,10 +7,18 @@ import api from '../../../api'; import { createLocalId } from '../../../utils/local-id'; export function* createTask(cardId, data) { - const nextData = { - ...data, - position: yield select(selectors.selectNextTaskPosition, cardId), - }; + let nextData = {}; + if (data.position) { + nextData = { + ...data, + position: data.position, + }; + } else { + nextData = { + ...data, + position: yield select(selectors.selectNextTaskPosition, cardId), + }; + } const localId = yield call(createLocalId);