瀏覽代碼

Fix transfer schedule update for `auto_deploy` option

Daniel Vincze 1 年之前
父節點
當前提交
c068ff7fbc
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      coriolis/db/api.py

+ 4 - 1
coriolis/db/api.py

@@ -367,7 +367,10 @@ def update_transfer_schedule(context, transfer_id, schedule_id,
     schedule = get_transfer_schedule(context, transfer_id, schedule_id)
     schedule = get_transfer_schedule(context, transfer_id, schedule_id)
     if pre_update_callable:
     if pre_update_callable:
         pre_update_callable(schedule=schedule)
         pre_update_callable(schedule=schedule)
-    for val in ["schedule", "expiration_date", "enabled", "shutdown_instance"]:
+    updateable_attributes = [
+        "schedule", "expiration_date", "enabled", "shutdown_instance",
+        "auto_deploy"]
+    for val in updateable_attributes:
         if val in updated_values:
         if val in updated_values:
             setattr(schedule, val, updated_values[val])
             setattr(schedule, val, updated_values[val])
     if post_update_callable:
     if post_update_callable: