mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Improved import_label creation logic
no issue - When an import was done and there were no "global labels" present Ghost created generic `import-[data]` label which later helped to find a specific batch of imported data - It did not make sense to create such generic label when user provided their own unique label - The rules that work now are: 1. When there is no global provided Ghost generates on and removes it in case there are no imported records 2. When there is a unique new global label provided no new label is generated, but the label stays even if there are no imported records
This commit is contained in:
parent
3fa94b579d
commit
8f1691b052
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ function serializeMemberLabels(labels) {
|
|||
function getMemberData({members, allLabelModels, importSetLabels, createdBy}) {
|
||||
const labelIdLookup = allLabelModels.reduce(function (labelIdLookupAcc, labelModel) {
|
||||
return Object.assign(labelIdLookupAcc, {
|
||||
[labelModel.get('name')]: labelModel.id
|
||||
[labelModel.name]: labelModel.id
|
||||
});
|
||||
}, {});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue