Don't send a value in delete pubsub event
Current code sent deleted object ID both in key and value fields of the update. Since both are always equal, no reason to send this info twice. Change-Id: I3616a42e9daca3f91ec4ed7ade466e7737c90570
This commit is contained in:
parent
0aa3b2e89c
commit
1e6d56030a
|
@ -251,7 +251,7 @@ class NbApi(object):
|
|||
|
||||
if not skip_send_event:
|
||||
self._send_db_change_event(model.table_name, obj.id, 'delete',
|
||||
obj.id, topic)
|
||||
None, topic)
|
||||
|
||||
def get(self, lean_obj):
|
||||
"""Retrieve a model instance from the database. This function uses
|
||||
|
|
|
@ -121,7 +121,7 @@ class TestNbApi(tests_base.BaseTestCase):
|
|||
self.assertEqual('id1', update.key)
|
||||
self.assertEqual('delete', update.action)
|
||||
self.assertEqual('topic', update.topic)
|
||||
self.assertEqual('id1', update.value)
|
||||
self.assertIsNone(update.value)
|
||||
|
||||
self.api_nb.driver.delete_key.assert_called_once_with(
|
||||
'dummy_table', 'id1', 'topic')
|
||||
|
|
Loading…
Reference in New Issue