Skip to content

Commit e6ed098

Browse files
committed
riak_object remodel
1 parent 466a9cf commit e6ed098

File tree

6 files changed

+222
-311
lines changed

6 files changed

+222
-311
lines changed

riak/bucket.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ def new(self, key=None, data=None, content_type='application/json'):
125125
raise TypeError('Unicode data values are not supported.')
126126

127127
obj = RiakObject(self._client, self, key)
128-
obj.set_data(data)
129-
obj.set_content_type(content_type)
128+
obj.data = data
129+
obj.content_type = content_type
130130
obj._encode_data = True
131131
return obj
132132

@@ -146,8 +146,8 @@ def new_binary(self, key, data, content_type='application/octet-stream'):
146146
:rtype: :class:`RiakObject <riak.riak_object.RiakObject>`
147147
"""
148148
obj = RiakObject(self._client, self, key)
149-
obj.set_data(data)
150-
obj.set_content_type(content_type)
149+
obj.data = data
150+
obj.content_type = content_type
151151
obj._encode_data = False
152152
return obj
153153

0 commit comments

Comments
 (0)