Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cn-uat' into cn-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Nov 28, 2023
2 parents 2f8742c + 92160b8 commit 7bc913f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions server/cp/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions server/tests/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
),
Expand All @@ -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",
}
),
Expand All @@ -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",
}
),
Expand Down

0 comments on commit 7bc913f

Please sign in to comment.