scheduled_at needs a value for manual_failover (#1024)

The variable scheduled_at may be undefined for a manual failover where there is an exception raised trying to switchover with REST API.
This commit is contained in:
Sharoon Thomas
2019-04-08 12:35:15 +02:00
committed by Alexander Kukushkin
parent 6909ce0c7a
commit d418a9449e
+1
View File
@@ -625,6 +625,7 @@ def _do_failover_or_switchover(obj, action, cluster_name, master, candidate, for
raise PatroniCtlException('Member {0} does not exist in cluster {1}'.format(candidate, cluster_name))
scheduled_at_str = None
scheduled_at = None
if action == 'switchover':
if scheduled is None and not force: