mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Fix bug in call to get default swimlane
This commit is contained in:
parent
ed54c09b48
commit
36a4740429
1 changed files with 7 additions and 6 deletions
|
@ -4,19 +4,20 @@ Meteor.methods({
|
|||
check(toBoardId, String);
|
||||
|
||||
const swimlane = Swimlanes.findOne(swimlaneId);
|
||||
const board = Boards.findOne(toBoardId);
|
||||
const fromBoard = Boards.findOne(swimlane.boardId);
|
||||
const toBoard = Boards.findOne(toBoardId);
|
||||
|
||||
if (swimlane && board) {
|
||||
if (swimlane && toBoard) {
|
||||
swimlane.lists().forEach(list => {
|
||||
const boardList = Lists.findOne({
|
||||
const toList = Lists.findOne({
|
||||
boardId: toBoardId,
|
||||
title: list.title,
|
||||
archived: false,
|
||||
});
|
||||
|
||||
let toListId;
|
||||
if (boardList) {
|
||||
toListId = boardList._id;
|
||||
if (toList) {
|
||||
toListId = toList._id;
|
||||
} else {
|
||||
toListId = Lists.insert({
|
||||
title: list.title,
|
||||
|
@ -42,7 +43,7 @@ Meteor.methods({
|
|||
});
|
||||
|
||||
// make sure there is a default swimlane
|
||||
this.board().getDefaultSwimline();
|
||||
fromBoard.getDefaultSwimline();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue