Minor fix in BillEntry (Virtual Resource event have no file path).
authorProdromos Gerakios <pgerakios@grnet.gr>
Thu, 6 Sep 2012 08:46:47 +0000 (11:46 +0300)
committerProdromos Gerakios <pgerakios@grnet.gr>
Thu, 6 Sep 2012 08:46:47 +0000 (11:46 +0300)
src/main/scala/gr/grnet/aquarium/charging/bill/BillEntry.scala

index eacf99a..231063f 100644 (file)
@@ -134,7 +134,11 @@ object AbstractBillEntry {
     val rcType =  w.resourceType.name
     val rcName = rcType match {
             case "diskspace" =>
-              w.currentResourceEvent.details("path")
+              w.currentResourceEvent.details.get("path") match {
+                case Some(path) => path
+                case None =>
+                  w.currentResourceEvent.instanceID
+              }
             case _ =>
               w.currentResourceEvent.instanceID
         }