summaryrefslogtreecommitdiff
path: root/ick2/projectapi.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-01-21 13:48:29 +0200
committerLars Wirzenius <liw@liw.fi>2018-01-21 20:27:35 +0200
commit832611434405f4efae05d16f15ab9f7b88ae810c (patch)
tree06a258ed8fdabe8ab34185b41a5a483fb3905b31 /ick2/projectapi.py
parentfb9548f872b37d1536e260b0d1b5befd11d50e65 (diff)
downloadick2-832611434405f4efae05d16f15ab9f7b88ae810c.tar.gz
Fix: retain next_build_id when project is updated
Diffstat (limited to 'ick2/projectapi.py')
-rw-r--r--ick2/projectapi.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ick2/projectapi.py b/ick2/projectapi.py
index ffa1f1b..9548c38 100644
--- a/ick2/projectapi.py
+++ b/ick2/projectapi.py
@@ -22,12 +22,17 @@ class ProjectAPI(ick2.ResourceApiBase):
super().__init__('projects', state)
self._pi = ick2.PipelineInstances(self.get_state())
- def mangle_resource(self, resource):
+ def mangle_new_resource(self, resource):
new = dict(resource)
if 'next_build_id' not in new:
new['next_build_id'] = None
return new
+ def mangle_updated_resource(self, old, new):
+ new = dict(new)
+ new['next_build_id'] = old.get('next_build_id')
+ return new
+
def get_resource_name(self, resource):
return resource['project']