Skip to content

Commit 90f03c9

Browse files
committed
Add missing XML declaration
1 parent 60822ef commit 90f03c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drafthorse/models/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def serialize(self, schema="FACTUR-X_BASIC"):
123123
for ns, url in self.__namespaces.items():
124124
if f"xmlns:{ns}".encode() not in xml:
125125
root.set(f"xmlns:{ns}", url)
126-
return ET.tostring(root, "utf-8")
126+
return ET.tostring(root, "utf-8", xml_declaration=True)
127127

128128
class Meta:
129129
namespace = NS_RSM

0 commit comments

Comments
 (0)