Skip to content
Snippets Groups Projects
Commit 4c86b414 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-190: payload is now formatted as parsable json string

parent 3771e8d3
No related branches found
No related tags found
1 merge request!252Resolve TMSS-190
......@@ -107,7 +107,7 @@ class TMSSPGListener(PostgresListener):
self.executeQuery(makePostgresNotificationQueries('', 'tmssapp_schedulingunitdraft', 'delete'))
self.subscribe('tmssapp_schedulingunitdraft_delete', self.onSchedulingUnitDraftDeleted)
self.executeQuery(makePostgresNotificationQueries('', 'tmssapp_schedulingunitdraft', 'update', 'scheduling_constraints_doc'))
self.executeQuery(makePostgresNotificationQueries('', 'tmssapp_schedulingunitdraft', 'update', column_name='scheduling_constraints_doc', quote_column_value=False))
self.subscribe('tmssapp_schedulingunitdraft_update_column_scheduling_constraints_doc'[:63], self.onSchedulingUnitDraftConstraintsUpdated)
# Settings
......@@ -200,8 +200,6 @@ class TMSSPGListener(PostgresListener):
def onSchedulingUnitDraftConstraintsUpdated(self, payload = None):
# convert payload string to nested json doc
payload = json.loads(payload)
payload['scheduling_constraints_doc'] = json.loads(payload['scheduling_constraints_doc'])
self._sendNotification(TMSS_SCHEDULINGUNITDRAFT_OBJECT_EVENT_PREFIX+'.Constraints.Updated', payload)
def onSettingUpdated(self, payload = None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment