fix: Fix typeorm .save usage (no-changelog) (#8678)
This commit is contained in:
@@ -492,7 +492,7 @@ export class SourceControlImportService {
|
||||
key,
|
||||
value: valueOverrides[key],
|
||||
});
|
||||
await Container.get(VariablesRepository).save(newVariable);
|
||||
await Container.get(VariablesRepository).save(newVariable, { transaction: false });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,11 +173,14 @@ export class SourceControlPreferencesService {
|
||||
if (saveToDb) {
|
||||
const settingsValue = JSON.stringify(this._sourceControlPreferences);
|
||||
try {
|
||||
await Container.get(SettingsRepository).save({
|
||||
key: SOURCE_CONTROL_PREFERENCES_DB_KEY,
|
||||
value: settingsValue,
|
||||
loadOnStartup: true,
|
||||
});
|
||||
await Container.get(SettingsRepository).save(
|
||||
{
|
||||
key: SOURCE_CONTROL_PREFERENCES_DB_KEY,
|
||||
value: settingsValue,
|
||||
loadOnStartup: true,
|
||||
},
|
||||
{ transaction: false },
|
||||
);
|
||||
} catch (error) {
|
||||
throw new ApplicationError('Failed to save source control preferences', { cause: error });
|
||||
}
|
||||
|
||||
@@ -71,10 +71,13 @@ export class VariablesService {
|
||||
this.validateVariable(variable);
|
||||
|
||||
void Container.get(InternalHooks).onVariableCreated({ variable_type: variable.type });
|
||||
const saveResult = await this.variablesRepository.save({
|
||||
...variable,
|
||||
id: generateNanoId(),
|
||||
});
|
||||
const saveResult = await this.variablesRepository.save(
|
||||
{
|
||||
...variable,
|
||||
id: generateNanoId(),
|
||||
},
|
||||
{ transaction: false },
|
||||
);
|
||||
await this.updateCache();
|
||||
return saveResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user