From 4fb84f33e5cdbd2bfa61974b99ff5e833ec96fd5 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Tue, 28 May 2024 17:09:40 +0530 Subject: [PATCH] dev: add licence version to license check (#316) --- apiserver/plane/db/management/commands/license_check.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apiserver/plane/db/management/commands/license_check.py b/apiserver/plane/db/management/commands/license_check.py index 3550217331..00d3f78920 100644 --- a/apiserver/plane/db/management/commands/license_check.py +++ b/apiserver/plane/db/management/commands/license_check.py @@ -18,6 +18,7 @@ class Command(BaseCommand): license_key = os.environ.get("LICENSE_KEY", False) deploy_platform = os.environ.get("DEPLOY_PLATFORM", False) domain = os.environ.get("LICENSE_DOMAIN", False) + license_version = os.environ.get("LICENSE_VERSION", False) # If any of the above is not provided raise a command error if not prime_host or not machine_signature or not license_key: @@ -53,11 +54,14 @@ class Command(BaseCommand): json={ "machine_signature": str(machine_signature), "domain": domain, + "version": license_version, }, ) + response.raise_for_status() self.stdout.write( self.style.SUCCESS("Instance created successfully") ) + return else: raise CommandError("Instance does not exist")