mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 12:43:13 +02:00
fix: boolean config variables can't be set to false
This commit is contained in:
@@ -81,7 +81,7 @@ export class ConfigService {
|
|||||||
if (!configVariable || configVariable.locked)
|
if (!configVariable || configVariable.locked)
|
||||||
throw new NotFoundException("Config variable not found");
|
throw new NotFoundException("Config variable not found");
|
||||||
|
|
||||||
if (value == "") {
|
if (value === "") {
|
||||||
value = null;
|
value = null;
|
||||||
} else if (
|
} else if (
|
||||||
typeof value != configVariable.type &&
|
typeof value != configVariable.type &&
|
||||||
@@ -100,7 +100,7 @@ export class ConfigService {
|
|||||||
name: key.split(".")[1],
|
name: key.split(".")[1],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: { value: value ? value.toString() : null },
|
data: { value: value === null ? null : value.toString() },
|
||||||
});
|
});
|
||||||
|
|
||||||
this.configVariables = await this.prisma.config.findMany();
|
this.configVariables = await this.prisma.config.findMany();
|
||||||
|
|||||||
Reference in New Issue
Block a user