Compare commits
3 Commits
af58391164
...
63fe8c9b80
Author | SHA1 | Date | |
---|---|---|---|
63fe8c9b80 | |||
d14552dd78 | |||
c32633ba09 |
@ -15,7 +15,7 @@ class Domain:
|
||||
self.domain = domain
|
||||
self.group = group
|
||||
if zone_history_are_ids:
|
||||
self.zone_history = [UncompleteZoneMeta(self, zid) for zid in zone_history]
|
||||
self.zone_history = [UncompleteZoneMeta(self, zid) for zid in zone_history] if zone_history is not None else []
|
||||
else:
|
||||
self.zone_history = zone_history if zone_history is not None else []
|
||||
|
||||
|
@ -144,7 +144,7 @@ class Zone(ZoneMeta):
|
||||
|
||||
return r.json()
|
||||
|
||||
def apply_changes(self):
|
||||
def apply_changes(self, message=""):
|
||||
rdiff = self._session.session.post(
|
||||
self._session.baseurl + "/api/domains/" + quote(self._domainid) + "/diff_zones/%40/" + quote(self.id),
|
||||
)
|
||||
@ -154,7 +154,10 @@ class Zone(ZoneMeta):
|
||||
|
||||
r = self._session.session.post(
|
||||
self._session.baseurl + "/api/domains/" + quote(self._domainid) + "/zone/" + quote(self.id) + "/apply_changes",
|
||||
data=rdiff.text
|
||||
data=json.dumps({
|
||||
"wantedCorrections": json.loads(rdiff.text),
|
||||
"commitMessage": message,
|
||||
})
|
||||
)
|
||||
|
||||
if r.status_code > 300:
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "happydomain"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
authors = [
|
||||
{ name="happyDomain's team", email="contact+pypi@happydomain.org" },
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user