Merge pull request #2474 from ostcar/send_full_data_through_channel

Send full_data through the channel.
This commit is contained in:
Oskar Hahn 2016-10-01 15:44:34 +02:00 committed by GitHub
commit 45df53ab45
2 changed files with 6 additions and 3 deletions

View File

@ -80,8 +80,12 @@ class CollectionElement:
'collection_string': self.collection_string, 'collection_string': self.collection_string,
'id': self.id, 'id': self.id,
'deleted': self.is_deleted()} 'deleted': self.is_deleted()}
if self.information is not None: if self.information:
channel_message['information'] = self.information channel_message['information'] = self.information
if self.full_data:
# Do not use the method get_full_data but the attribute, so the
# full_data is not generated.
channel_message['full_data'] = self.full_data
return channel_message return channel_message
def as_autoupdate(self, method, *args): def as_autoupdate(self, method, *args):

View File

@ -90,8 +90,7 @@ class TestCollectionElement(TestCase):
collection_element.as_channels_message(), collection_element.as_channels_message(),
{'collection_string': 'testmodule/model', {'collection_string': 'testmodule/model',
'id': 42, 'id': 42,
'deleted': False, 'deleted': False})
'information': {}})
def test_as_autoupdate_for_user(self): def test_as_autoupdate_for_user(self):
collection_element = collection.CollectionElement.from_values('testmodule/model', 42) collection_element = collection.CollectionElement.from_values('testmodule/model', 42)