diff --git a/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py b/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py index f286deda3ead326d78f59ba06a3e7fdf6443858b..44ce4e052ccc7a9ab8cc7d21d22dc56e163056ae 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py +++ b/SAS/ResourceAssignment/ResourceAssignmentDatabase/radbpglistener.py @@ -123,6 +123,12 @@ class RADBPGListener(PostgresListener): def _sendNotification(self, subject, payload, timestampFields = None): try: content = json.loads(payload) + + if 'new' in content and 'old' in content: + if content['new'] == content['old']: + logger.info('new and old values are equal, not sending notification. %s' % (content['new'])) + return + if timestampFields: content = self._formatTimestampsAsIso(timestampFields, content) except Exception as e: