Commits

George Notaras committed f0028db

Fixed bug: Invalid error about missing SOA record when importing zone from web for without specifying the origin.

  • Participants
  • Parent commits 5854cbf

Comments (0)

Files changed (1)

src/powerdns_manager/utils.py

     """
     # TODO: check what goes on with unicode
     # Does not seem to be able to process unicode, so encode data to latin1
-    origin = origin.encode('latin1')
+    if origin:
+        origin = origin.encode('latin1')
+    else:
+        origin = None
     zonetext = zonetext.encode('latin1')
     zonetext = zonetext.replace('\r\n', '\n')