aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking/views.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-02-13 14:25:24 -0500
committerParker Berberian <pberberian@iol.unh.edu>2020-02-13 14:25:24 -0500
commit8c012f8a9bc64add11920688abcd6981278cb0ea (patch)
tree99772d9361784d2724d1665c566c69888ff7d5e9 /src/booking/views.py
parentf5cdab1569b26df0c7ffc3df1529f095116fd13a (diff)
Fix Imports
Fixes stale import statements. The dashboard can now come up and we can run our unit tests Change-Id: I7189afb2cd37aaa2492de065c236b6aa9a35de5b Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/booking/views.py')
-rw-r--r--src/booking/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/booking/views.py b/src/booking/views.py
index 8e25952..39b24a7 100644
--- a/src/booking/views.py
+++ b/src/booking/views.py
@@ -18,7 +18,7 @@ from django.shortcuts import redirect, render
from django.db.models import Q
from django.urls import reverse
-from resource_inventory.models import ResourceBundle, HostProfile, Image, Host
+from resource_inventory.models import ResourceBundle, ResourceProfile, Image, ResourceQuery
from resource_inventory.resource_manager import ResourceManager
from account.models import Lab, Downtime
from booking.models import Booking
@@ -130,7 +130,7 @@ class ResourceBookingsJSON(View):
def build_image_mapping(lab, user):
mapping = {}
- for profile in HostProfile.objects.filter(labs=lab):
+ for profile in ResourceProfile.objects.filter(labs=lab):
images = Image.objects.filter(
from_lab=lab,
host_type=profile
@@ -178,7 +178,7 @@ def booking_modify_image(request, booking_id):
if timezone.now() > booking.end:
return HttpResponse("unauthorized")
new_image = Image.objects.get(id=form.cleaned_data['image_id'])
- host = Host.objects.get(id=form.cleaned_data['host_id'])
+ host = ResourceQuery.get(labid=form.cleaned_data['host_id'])
host.config.image = new_image
host.config.save()
JobFactory.reimageHost(new_image, booking, host)