mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-01 13:09:35 -06:00
Fix #4551
This commit is contained in:
parent
a243f3d7c2
commit
c32e09a2b3
@ -730,7 +730,6 @@ export default {
|
||||
// meta data
|
||||
budget_id: array.budget_id,
|
||||
category_name: array.category,
|
||||
tags: array.tags,
|
||||
|
||||
// optional date fields (6x):
|
||||
interest_date: array.interest_date,
|
||||
@ -750,11 +749,28 @@ export default {
|
||||
zoom_level: array.zoom_level,
|
||||
longitude: array.longitude,
|
||||
latitude: array.latitude,
|
||||
tags: [],
|
||||
|
||||
// from thing:
|
||||
order: 0,
|
||||
reconciled: false,
|
||||
};
|
||||
|
||||
if (0 !== array.tags.length) {
|
||||
for (let i in array.tags) {
|
||||
if (array.tags.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {
|
||||
// array.tags
|
||||
let current = array.tags[i];
|
||||
if(typeof current === 'object' && null !== current) {
|
||||
currentSplit.tags.push(current.text);
|
||||
}
|
||||
if(typeof current === 'string') {
|
||||
currentSplit.tags.push(current);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// bills and piggy banks
|
||||
if (0 !== array.piggy_bank_id) {
|
||||
currentSplit.piggy_bank_id = array.piggy_bank_id;
|
||||
|
@ -500,7 +500,23 @@ export default {
|
||||
// console.log('tags are different');
|
||||
// console.log(currentTransaction.tags);
|
||||
// console.log(originalTransaction.tags);
|
||||
diff.tags = currentTransaction.tags;
|
||||
diff.tags = [];//currentTransaction.tags;
|
||||
|
||||
if (0 !== currentTransaction.tags.length) {
|
||||
for (let ii in currentTransaction.tags) {
|
||||
if (currentTransaction.tags.hasOwnProperty(ii) && /^0$|^[1-9]\d*$/.test(ii) && ii <= 4294967294) {
|
||||
// array.tags
|
||||
let currentTag = currentTransaction.tags[ii];
|
||||
if(typeof currentTag === 'object' && null !== currentTag) {
|
||||
diff.tags.push(currentTag.text);
|
||||
}
|
||||
if(typeof currentTag === 'string') {
|
||||
diff.tags.push(currentTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shouldSubmit = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user