fix if another language (undefined) not work telegram msg.

This commit is contained in:
Paolo Arena
2022-10-08 14:25:00 +02:00
parent d242a61fe6
commit c9a2302dfb
3 changed files with 12 additions and 1 deletions

View File

@@ -178,6 +178,10 @@ const CircuitSchema = new Schema({
transactionsEnabled: {
type: Boolean,
},
status: {
type: Number,
default: 0,
},
});
CircuitSchema.pre('save', async function(next) {
@@ -235,6 +239,7 @@ CircuitSchema.statics.getWhatToShow = function(idapp, username) {
fido_scoperto_default: 1,
deperimento: 1,
transactionsEnabled: 1,
status: 1,
qta_max_default: 1,
valuta_per_euro: 1,
symbol: 1,
@@ -307,6 +312,7 @@ CircuitSchema.statics.getWhatToShow_Unknown = function(idapp, username) {
req_users: 1,
refused_users: 1,
transactionsEnabled: 1,
status: 1,
'mycities': 1,
};
};

View File

@@ -1364,7 +1364,7 @@ function getstr(lang, key, param1) {
}
}
if (mystr === '')
if (!mystr || mystr === '')
mystr = txt[key];
if (!!param1) {

View File

@@ -494,4 +494,9 @@ module.exports = {
}
],
CIRCUIT_STATUS: {
FASE1_CREAZIONE_GRUPPO: 0,
FASE2_MONETA_ABILITATA: 1,
},
};