X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fxoslib%2Fobjects%2Fsliceplus.py;h=7e9836c9b0cc083534e45ca9cec6267bfa5317f0;hb=9bd81c3414ae5c6aef81f3af36f7810da76a7d31;hp=cd86fcef75e7f6345ff18f11911071695772dd48;hpb=9d25b6fbf572e12afb5ccd5562be1b24661d5f0a;p=plstackapi.git diff --git a/planetstack/core/xoslib/objects/sliceplus.py b/planetstack/core/xoslib/objects/sliceplus.py index cd86fce..7e9836c 100644 --- a/planetstack/core/xoslib/objects/sliceplus.py +++ b/planetstack/core/xoslib/objects/sliceplus.py @@ -131,6 +131,11 @@ class SlicePlus(Slice, PlusObjectMixin): def save_site_allocation(self, noAct = False, reset=False): print "save_site_allocation, reset=",reset + if (not self._site_allocation): + # Must be a sliver that was just created, and has not site_allocation + # field. + return + all_slice_slivers = self.slivers.all() for site_name in self._site_allocation.keys(): desired_allocation = self._site_allocation[site_name]