HAS returns exception when the demand
is empty. Now, HAS will returns
translattion error when demand is empty
Issue-ID: OPTFRA-511
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: I56ae57e9d2411dfd9a770cd6e28ea6c68439c5b8
def parse_demands(self, demands):
"""Validate/prepare demands for use by the solver."""
+ if not demands:
+ raise TranslatorException("demand is not provided in the template")
if type(demands) is not dict:
raise TranslatorException("Demands must be provided in "
"dictionary form")