diff --git a/server/cp/signals.py b/server/cp/signals.py index e59a79f..cfce465 100644 --- a/server/cp/signals.py +++ b/server/cp/signals.py @@ -43,14 +43,14 @@ def on_user_created(sender, user, **kwargs): def on_user_updated(sender, user, updates=None, **kwargs): if user_auth_is_gip(user): if updates and updates.get("password"): - send_notification("password change", user) + send_notification("password", user) else: - send_notification("update user", user) + send_notification("update", user) def on_user_deleted(sender, user, **kwargs): if user_auth_is_gip(user): - send_notification("delete user", user) + send_notification("delete", user) def on_push(sender, item, **kwargs): diff --git a/server/settings.py b/server/settings.py index ead9fbb..09badae 100644 --- a/server/settings.py +++ b/server/settings.py @@ -87,7 +87,6 @@ "DATE_FORMAT": "MMM Do, YYYY", "COVERAGE_DATE_FORMAT": "MMM Do, YYYY", "COVERAGE_DATE_TIME_FORMAT": "HH:mm MMM Do, YYYY", - # server formats "DATE_FORMAT_HEADER": "long", } @@ -101,7 +100,6 @@ "COVERAGE_DATE_TIME_FORMAT": "HH:mm [le] Do MMMM YYYY", "AGENDA_DATE_FORMAT_SHORT": "dddd, D MMMM", "AGENDA_DATE_FORMAT_LONG": "dddd, D MMMM YYYY", - # server formats "DATE_FORMAT_HEADER": "d MMMM yyyy à H:mm zzz", "NOTIFICATION_EMAIL_TIME_FORMAT": "HH:mm", @@ -304,6 +302,8 @@ AGENDA_SHOW_MULTIDAY_ON_START_ONLY = True +WIRE_NOTIFICATIONS_ON_CORRECTIONS = True + CONTENTAPI_ELASTICSEARCH_SETTINGS["settings"]["analysis"]["analyzer"]["html_field_analyzer"]["filter"] = [ "lowercase", "elision", diff --git a/server/tests/test_signals.py b/server/tests/test_signals.py index 6d3cc3c..df4cfa6 100644 --- a/server/tests/test_signals.py +++ b/server/tests/test_signals.py @@ -84,7 +84,7 @@ def test_cem_notification_on_user_changes(app): { "object_id": str(user["_id"]), "company": str(company_id), - "type": "update user", + "type": "update", "platform": "Test", } ), @@ -102,7 +102,7 @@ def test_cem_notification_on_user_changes(app): { "object_id": str(user["_id"]), "company": str(company_id), - "type": "password change", + "type": "password", "platform": "Test", } ), @@ -120,7 +120,7 @@ def test_cem_notification_on_user_changes(app): { "object_id": str(user["_id"]), "company": str(company_id), - "type": "delete user", + "type": "delete", "platform": "Test", } ),