🐛 Don't try to write None values into upload body

Closes #3349
This commit is contained in:
Gina Häußge committed 2019-11-26 15:34:14 +01:00
1 parent 1deb247ce5
commit 471dab9406
1 file changed
+2
+2
View File
@@ -460,6 +460,8 @@ class UploadStorageFallbackHandler(RequestlessExceptionLoggingMixin,
fields = dict((self._suffixes[key], value) for (key, value) in parameters.items())
for n, p in fields.items():
if n is None or p is None:
continue
key = name + b"." + octoprint.util.to_bytes(n)
self._new_body += b"--%s\r\n" % self._multipart_boundary
self._new_body += b"Content-Disposition: form-data; name=\"%s\"\r\n" % key