Merge branch 'master' of ssh://git.planet-lab.org/git/plstackapi
diff --git a/planetstack/core/dashboard/views/view_common.py b/planetstack/core/dashboard/views/view_common.py
index 7d51435..4bcb17d 100644
--- a/planetstack/core/dashboard/views/view_common.py
+++ b/planetstack/core/dashboard/views/view_common.py
@@ -61,8 +61,13 @@
userSliceInfo = []
for entry in slicePrivs:
- slicename = Slice.objects.get(id=entry.slice.id).name
- slice = Slice.objects.get(name=Slice.objects.get(id=entry.slice.id).name)
+ slice = Slice.objects.filter(id=entry.slice.id)
+ if not slice:
+ # the privilege is to a slice that doesn't exist
+ print "data model consistency problem, slice %s doesn't exist" % entry.slice.id
+ continue
+ slice = slice[0]
+ slicename = slice.name
sliverList=Sliver.objects.all()
sites_used = {}
for sliver in slice.slivers.all():