aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/api/migrations/0022_add_cifile_generated_field.py15
-rw-r--r--src/booking/stats.py1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/api/migrations/0022_add_cifile_generated_field.py b/src/api/migrations/0022_add_cifile_generated_field.py
new file mode 100644
index 0000000..f83a102
--- /dev/null
+++ b/src/api/migrations/0022_add_cifile_generated_field.py
@@ -0,0 +1,15 @@
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ('api', '0018_cloudinitfile'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="CloudInitFile",
+ name="generated",
+ field=models.BooleanField(default=False)
+ ),
+ ]
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()}