Browse Source

Fixed empty region value on custom_s3

master
Ruel Tmeizeh - RuhNet 3 months ago
parent
commit
5d02673130
1 changed files with 10 additions and 6 deletions
  1. +10
    -6
      app.js

+ 10
- 6
app.js View File

@ -212,13 +212,17 @@ console.log(self.storages);
var attachments = storageData.attachments;
for(var i in attachments) if(attachments.hasOwnProperty(i)) {
var thisItem = attachments[i];
var settings = thisItem.settings;
if (thisItem.settings && thisItem.settings.port) {
thisItem.settings.port = Number(thisItem.settings.port);
} else {
thisItem.settings.port = 443;
if (type == "couchdb") thisItem.settings.port = 5984;
var settings = {};
if (thisItem.settings) {
settings = _.omitBy(thisItem.settings, _.isEmpty); //filter out empty values
if (settings.port) {
settings.port = Number(settings.port);
} else {
settings.port = 443;
if (type == "couchdb") settings.port = 5984;
}
}
thisItem.settings = settings;
attachments[i] = thisItem;
};
storageData.attachments = attachments;


Loading…
Cancel
Save