Skip to content

Commit

Permalink
Update messages in validation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
annawzz committed Sep 16, 2017
1 parent 3896997 commit a5a51a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openprocurement/tender/esco/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ def lot_minValue(self):

def validate_yearlyPaymentsPercentageRange(self, data, value):
if data['fundingKind'] == 'other' and value != 0.8:
raise ValidationError('when fundingKind is "other", yearlyPaymentsPercentageRange should be equal 0.8')
raise ValidationError('when fundingKind is other, yearlyPaymentsPercentageRange should be equal 0.8')
if data['fundingKind'] == 'budget' and (value > 0.8 or value < 0):
raise ValidationError('when fundingKind is "budget", yearlyPaymentsPercentageRange should be less or equal 0.8, and more than 0')
raise ValidationError('when fundingKind is budget, yearlyPaymentsPercentageRange should be less or equal 0.8, and more than 0')


class ContractDuration(Model):
Expand Down Expand Up @@ -522,9 +522,9 @@ def validate_lots(self, data, value):

def validate_yearlyPaymentsPercentageRange(self, data, value):
if data['fundingKind'] == 'other' and value != 0.8:
raise ValidationError('when fundingKind is "other", yearlyPaymentsPercentageRange should be equal 0.8')
raise ValidationError('when fundingKind is other, yearlyPaymentsPercentageRange should be equal 0.8')
if data['fundingKind'] == 'budget' and (value > 0.8 or value < 0):
raise ValidationError('when fundingKind is "budget", yearlyPaymentsPercentageRange should be less or equal 0.8, and more than 0')
raise ValidationError('when fundingKind is budget, yearlyPaymentsPercentageRange should be less or equal 0.8, and more than 0')

def check_auction_time(self):
if self.auctionPeriod and self.auctionPeriod.startDate and self.auctionPeriod.shouldStartAfter \
Expand Down

0 comments on commit a5a51a0

Please sign in to comment.