Fix report and missing queue reason format
diff --git a/staffeln/conductor/backup.py b/staffeln/conductor/backup.py
index 32ad315..930ae0b 100755
--- a/staffeln/conductor/backup.py
+++ b/staffeln/conductor/backup.py
@@ -37,6 +37,7 @@
"instance_name",
"volume_name",
"incremental",
+ "reason",
],
)
diff --git a/staffeln/conductor/result.py b/staffeln/conductor/result.py
index c7ff1ab..a1587d8 100644
--- a/staffeln/conductor/result.py
+++ b/staffeln/conductor/result.py
@@ -83,7 +83,7 @@
"<h4>${FAILED_VOLUME_LIST}</h4><br>"
)
- for project_id in project_success:
+ if project_id in project_success:
success_volumes = "<br>".join(
[
"Volume ID: %s, Backup ID: %s, backup mode: %s"
@@ -97,7 +97,7 @@
)
else:
success_volumes = "<br>"
- for project_id in project_failed:
+ if project_id in project_failed:
failed_volumes = "<br>".join(
[
"Volume ID: %s, Reason: %s" % (str(e.volume_id), str(e.reason))
diff --git a/staffeln/objects/queue.py b/staffeln/objects/queue.py
index 39e841b..f1f6458 100644
--- a/staffeln/objects/queue.py
+++ b/staffeln/objects/queue.py
@@ -21,7 +21,7 @@
"volume_name": sfeild.StringField(),
"instance_name": sfeild.StringField(),
"incremental": sfeild.BooleanField(),
- "reason": sfeild.StringField(),
+ "reason": sfeild.StringField(nullable=True),
}
@base.remotable_classmethod