mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Fix Wekan JSON import bug
If not all users are mapped the import crashes.
This commit is contained in:
parent
e0576502d9
commit
0adde3e06d
2 changed files with 6 additions and 1 deletions
|
|
@ -69,24 +69,28 @@ CustomFields.attachSchema(
|
||||||
* should we show on the cards this custom field
|
* should we show on the cards this custom field
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
automaticallyOnCard: {
|
automaticallyOnCard: {
|
||||||
/**
|
/**
|
||||||
* should the custom fields automatically be added on cards?
|
* should the custom fields automatically be added on cards?
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
alwaysOnCard: {
|
alwaysOnCard: {
|
||||||
/**
|
/**
|
||||||
* should the custom field be automatically added to all cards?
|
* should the custom field be automatically added to all cards?
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
showLabelOnMiniCard: {
|
showLabelOnMiniCard: {
|
||||||
/**
|
/**
|
||||||
* should the label of the custom field be shown on minicards?
|
* should the label of the custom field be shown on minicards?
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
createdAt: {
|
createdAt: {
|
||||||
type: Date,
|
type: Date,
|
||||||
|
|
|
||||||
|
|
@ -258,8 +258,9 @@ export class WekanCreator {
|
||||||
// now add other members
|
// now add other members
|
||||||
if (boardToImport.members) {
|
if (boardToImport.members) {
|
||||||
boardToImport.members.forEach(wekanMember => {
|
boardToImport.members.forEach(wekanMember => {
|
||||||
// do we already have it in our list?
|
// is it defined and do we already have it in our list?
|
||||||
if (
|
if (
|
||||||
|
wekanMember.wekanId &&
|
||||||
!boardToCreate.members.some(
|
!boardToCreate.members.some(
|
||||||
member => member.wekanId === wekanMember.wekanId,
|
member => member.wekanId === wekanMember.wekanId,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue