mirror of
/repos/Prototyper.git
synced 2025-12-30 06:31:32 +01:00
update attribute in stead of overwriting
This commit is contained in:
parent
098f0fce02
commit
8aed6f75cd
@ -179,10 +179,14 @@ module.exports = function (config) {
|
||||
}
|
||||
};
|
||||
config.debug && console.log('getMongoAttribute attribute_options', attribute_options);
|
||||
return getMongoContent(attribute_options, function (err, attribute_result) {
|
||||
getMongoContent(attribute_options, function (err, attribute_result) {
|
||||
if (attribute_result) {
|
||||
config.debug && console.log('getMongoAttribute found lost attribute, reconnect');
|
||||
result[options.attribute] = { guid: attribute_result._id };
|
||||
if (result[options.attribute]) {
|
||||
result[options.attribute].guid = attribute_result._id;
|
||||
} else {
|
||||
result[options.attribute] = { guid: attribute_result._id };
|
||||
}
|
||||
return saveData(col, result, callback);
|
||||
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user