Commit 46f65300 authored by Samuel GAIST's avatar Samuel GAIST

[utils][commands][install] Improve query to get an environment

The current one gets the first environment found
for the python language rather than getting an
active environment for that language.
parent cce36b66
Pipeline #47844 passed with stage
in 17 minutes and 20 seconds
...@@ -1317,12 +1317,12 @@ class Command(BaseCommand): ...@@ -1317,12 +1317,12 @@ class Command(BaseCommand):
else: else:
system_user, plot_user, user = get_users(arguments["username"]) system_user, plot_user, user = get_users(arguments["username"])
from ....backend.models import EnvironmentLanguage from ....backend.models import Environment
from ....code.models import Code from ....code.models import Code
environment = ( environment = Environment.objects.filter(
EnvironmentLanguage.objects.filter(language=Code.PYTHON).first().environment languages__language=Code.PYTHON, active=True
) ).first()
queue = environment.queues.first() queue = environment.queues.first()
# Iterates over projects to install # Iterates over projects to install
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment