Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
mods/git.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/mods/git.py b/mods/git.py
index b1c4e14..50a1b39 100644
--- a/mods/git.py
+++ b/mods/git.py
@@ -358,10 +358,17 @@ class ApplierGetView(APILoginRequiredView):
class UnappliedSeriesSerializer(SeriesSerializer):
class Meta:
model = Message
- fields = SeriesSerializer.Meta.fields + ("mirror", "result_uri")
+ fields = SeriesSerializer.Meta.fields + ("mirror", "result_uri", "push_options")
mirror = SerializerMethodField()
result_uri = SerializerMethodField()
+ push_options = SerializerMethodField()
+
+ def get_push_options(self, obj):
+ if obj.project.config.get("git", {}).get("use_git_push_option", False):
+ return obj.git_result.data.get("git.push_options")
+ else:
+ return None
def get_result_uri(self, obj):
request = self.context["request"]
--
2.34.1
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel