diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/api/models.py | 4 | ||||
-rw-r--r-- | src/templates/base/dashboard/landing.html | 3 | ||||
-rw-r--r-- | src/workflow/resource_bundle_workflow.py | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/api/models.py b/src/api/models.py index 231ae31..960fc26 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -190,7 +190,9 @@ class LabManager(object): return json.dumps({"users": userlist}) def get_user(self, user_id): - profile = get_object_or_404(UserProfile, pk=user_id) + user = User.objects.get(pk=user_id) + + profile = get_object_or_404(UserProfile, user=user) return json.dumps(self.format_user(profile)) diff --git a/src/templates/base/dashboard/landing.html b/src/templates/base/dashboard/landing.html index dd09dc4..ed50638 100644 --- a/src/templates/base/dashboard/landing.html +++ b/src/templates/base/dashboard/landing.html @@ -35,7 +35,7 @@ {% block btnGrp %} <p>To get started, book a server below:</p> <a class="btn btn-primary btn-lg d-flex flex-column justify-content-center align-content-center border text-white p-4" href="/booking/quick/"> - Book a Server + Book a Resource </a> <p class="mt-4">PTLs can use our advanced options to book multi-node pods. If you are a PTL, you may use the options below: @@ -43,7 +43,6 @@ <div class="btn-group-vertical w-100"> <button class="btn btn-primary" onclick="create_workflow(0)">Book a Pod</button> <button class="btn btn-primary" onclick="create_workflow(1)">Design a Pod</button> - <button class="btn btn-primary" onclick="create_workflow(2)">Configure a Pod</button> </div> {% endblock btnGrp %} {% endif %} diff --git a/src/workflow/resource_bundle_workflow.py b/src/workflow/resource_bundle_workflow.py index fa05b22..006f481 100644 --- a/src/workflow/resource_bundle_workflow.py +++ b/src/workflow/resource_bundle_workflow.py @@ -263,6 +263,10 @@ class Define_Software(WorkflowStep): host.image = image host.save() + if not has_headnode: + self.set_invalid("No headnode. Please set a headnode.") + return + self.set_valid("Completed") else: self.set_invalid("Please complete all fields") |