Skip to content

Commit

Permalink
Code was loading requestvip data from database and not respecting the…
Browse files Browse the repository at this point in the history
… changes send by user. Although user send data with None in healthcheck_expect, the code was not setting this value int DB, raising errors. Fix #25
  • Loading branch information
Marcus Vinicius Goncalves Cesario committed Apr 3, 2015
1 parent 807b9fd commit a81a6d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions networkapi/requisicaovips/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,11 @@ def valid_values_healthcheck(self, vip_map, vip, evironment_vip):
self.log.error(
u'The healthcheck_type parameter is %s, then healthcheck and id_healthcheck_expect must be None.', healthcheck_type)
return vip_map, vip, 276
else:
vip_map['healthcheck'] = None
# Set id_healthcheck_expect to None
vip.healthcheck_expect = None


# If healthcheck_type is 'HTTP' id_healthcheck_expect and healthcheck
# must NOT be None
Expand Down Expand Up @@ -1247,10 +1252,6 @@ def valid_values_healthcheck(self, vip_map, vip, evironment_vip):
self.log.error(
'The id_healthcheck_expect parameter does not exist.')
raise HealthcheckExpectNotFoundError(None)
else:
vip_map['healthcheck'] = None
# Set id_healthcheck_expect to None
vip.healthcheck_expect = None

# Make changes in healthcheck
# Set healthcheck_type
Expand Down

0 comments on commit a81a6d8

Please sign in to comment.