diff --git a/beat/web/experiments/models.py b/beat/web/experiments/models.py index 63cf7294c2ae2a33a3c6d6133f53a472a1b285de..f28b9a0e805a1e3652ada67e5d048f65a43193c9 100644 --- a/beat/web/experiments/models.py +++ b/beat/web/experiments/models.py @@ -985,6 +985,21 @@ class Block(models.Model): if self.status != Block.NOT_CACHED: return + # checks queue and environment + if self.queue is None: + raise RuntimeError("Block `%s' does not have a queue assigned " \ + "- this normally indicates the originally selected " \ + "queue was deleted since the experiment was first " \ + "configured. Re-configure this experiment and select a new " \ + "default or block-specific queue" % self.name) + + if self.environment is None: + raise RuntimeError("Block `%s' does not have an environment " \ + "assigned - this normally indicates the originally selected " \ + "environment was deleted since the experiment was first " \ + "configured. Re-configure this experiment and select a new " \ + "default or block-specific environment" % self.name) + from ..backend.models import Job # search for other jobs with similar outputs and has no children yet