From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH network 2/3] api request helper: fix conditional declaration
Date: Thu, 6 Mar 2025 10:18:17 +0100 [thread overview]
Message-ID: <20250306091818.3841361-3-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20250306091818.3841361-1-t.lamprecht@proxmox.com>
Reported-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
src/PVE/Network/SDN.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index cc5febe..68f9e0f 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -262,7 +262,7 @@ sub encode_value {
sub api_request {
my ($method, $url, $headers, $data, $expected_fingerprint) = @_;
- my $encoded_data = to_json($data) if $data;
+ my $encoded_data = $data ? to_json($data) : undef;
my $req = HTTP::Request->new($method,$url, $headers, $encoded_data);
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-03-06 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 9:18 [pve-devel] applied-series: [PATCH network 0/3] smaller fixes and clean-ups Thomas Lamprecht
2025-03-06 9:18 ` [pve-devel] [PATCH network 1/3] fix missing use statements in core SDN module Thomas Lamprecht
2025-03-06 9:18 ` Thomas Lamprecht [this message]
2025-03-06 9:18 ` [pve-devel] [PATCH network 3/3] ipam dns: powerdns integration: factor out common API request code Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306091818.3841361-3-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal