attributes tweaks
[qcg-portal.git] / qcg / models.py
index 7205932..8c2be2d 100644 (file)
@@ -168,8 +168,8 @@ class Task(models.Model):
             self.reserved_time_start, self.reserved_time_finish = value
 
     @property
-    def hosts(self):
-        return {alloc.host_name for alloc in self.allocations.all()}
+    def short_host_names(self):
+        return {alloc.host_name.split('.')[0] for alloc in self.allocations.all()}
 
 
 class Allocation(models.Model):