aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking
diff options
context:
space:
mode:
Diffstat (limited to 'src/booking')
-rw-r--r--src/booking/stats.py1
-rw-r--r--src/booking/views.py5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/booking/stats.py b/src/booking/stats.py
index 70f91fa..5a59d32 100644
--- a/src/booking/stats.py
+++ b/src/booking/stats.py
@@ -94,6 +94,7 @@ class StatisticsManager(object):
proj_count = sorted(Counter(projects).items(), key=lambda x: x[1])
project_keys = [proj[0] for proj in proj_count[-5:]]
+ project_keys = ['None' if x is None else x for x in project_keys]
project_counts = [proj[1] for proj in proj_count[-5:]]
resources = {key: [x, value] for key, value in profiles.items()}
diff --git a/src/booking/views.py b/src/booking/views.py
index 940428b..367a18d 100644
--- a/src/booking/views.py
+++ b/src/booking/views.py
@@ -24,7 +24,7 @@ from booking.models import Booking
from booking.stats import StatisticsManager
from booking.forms import HostReImageForm
from workflow.forms import FormUtils
-from api.models import JobFactory
+from api.models import JobFactory, GeneratedCloudConfig
from workflow.views import login
from booking.forms import QuickBookingForm
from booking.quick_deployer import create_from_form, drop_filter
@@ -167,7 +167,8 @@ def booking_detail_view(request, booking_id):
'booking': booking,
'pdf': booking.pdf,
'user_id': user.id,
- 'image_mapping': build_image_mapping(booking.lab, user)
+ 'image_mapping': build_image_mapping(booking.lab, user),
+ 'posix_username': GeneratedCloudConfig._normalize_username(None, user.username)
}
return render(