def restore(self):
    models = self.models
    profitThres = models.Values.get(Values.PositionThresProfit, accountId=self.accountId)
    if (profitThres is None):
        raise PositionsManagerDBException('Settings "{k}" not initialized.'.format(k=Values.PositionThresProfit))
    self.profitThres = profitThres
    lossCutThres = models.Values.get(Values.PositionThresLossCut, accountId=self.accountId)
    if (lossCutThres is None):
        raise PositionsManagerDBException('Settings "{k}" not initialized.'.format(k=Values.PositionThresLossCut))
    self.lossCutThres = lossCutThres
def restore(self):
    models = self.models
    profitThres = models.Values.get(Values.PositionThresProfit, accountId=self.accountId)
    if (profitThres is None):
        raise PositionsManagerDBException('Settings "{k}" not initialized.'.format(k=Values.PositionThresProfit))
    self.profitThres = profitThres
    lossCutThres = models.Values.get(Values.PositionThresLossCut, accountId=self.accountId)
    if (lossCutThres is None):
        raise PositionsManagerDBException('Settings "{k}" not initialized.'.format(k=Values.PositionThresLossCut))
    self.lossCutThres = lossCutThres