mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): License should ignore empty input on onFeatureChange (#13912)
This commit is contained in:
committed by
GitHub
parent
31493a0cac
commit
dedcdbd314
@@ -131,11 +131,18 @@ export class License {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onFeatureChange(_features: TFeatures): Promise<void> {
|
async onFeatureChange(_features: TFeatures): Promise<void> {
|
||||||
|
const { isMultiMain, isLeader } = this.instanceSettings;
|
||||||
|
|
||||||
|
if (Object.keys(_features).length === 0) {
|
||||||
|
this.logger.error('Empty license features recieved', { isMultiMain, isLeader });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.logger.debug('License feature change detected', _features);
|
this.logger.debug('License feature change detected', _features);
|
||||||
|
|
||||||
this.checkIsLicensedForMultiMain(_features);
|
this.checkIsLicensedForMultiMain(_features);
|
||||||
|
|
||||||
if (this.instanceSettings.isMultiMain && !this.instanceSettings.isLeader) {
|
if (isMultiMain && !isLeader) {
|
||||||
this.logger
|
this.logger
|
||||||
.scoped(['scaling', 'multi-main-setup', 'license'])
|
.scoped(['scaling', 'multi-main-setup', 'license'])
|
||||||
.debug('Instance is not leader, skipping sending of "reload-license" command...');
|
.debug('Instance is not leader, skipping sending of "reload-license" command...');
|
||||||
|
|||||||
Reference in New Issue
Block a user