Skip to content

Commit 9ba146f

Browse files
committed
fix returning push id
1 parent 725b371 commit 9ba146f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

databox/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,13 @@ def push(self, key, value, date=None, attributes=None, unit=None):
104104
)]
105105
})
106106

107-
return 'id' in self.last_push_content
107+
return self.last_push_content['id']
108108

109109
def insert_all(self, rows):
110110
self.last_push_content = self._push_json({
111111
'data': [self.process_kpi(**row) for row in rows]
112112
})
113-
114-
return 'id' in self.last_push_content
113+
return self.last_push_content['id']
115114

116115
def last_push(self, number=1):
117116
return self._get_json(path='/lastpushes?limit={n}'.format(**{'n': number}))

0 commit comments

Comments
 (0)