Skip to content

Commit

Permalink
Merge pull request #1585 from GSA/cant_change_phone_number
Browse files Browse the repository at this point in the history
fix serialization for user phone number change
  • Loading branch information
xlorepdarkhelm authored Mar 11, 2025
2 parents df22caa + 03e5064 commit 2d0b01f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ def serialize_for_redis(self, obj):
value = (obj.created_at.strftime("%Y-%m-%d %H:%M:%S"),)
elif column.name in ["sent_at", "completed_at"]:
value = None
elif column.name.endswith("_id"):
elif column.name.endswith("_id") or column.name == "id":
value = getattr(obj, column.name)
value = str(value)
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/app/celery/test_scheduled_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def test_batch_insert_with_expired_notifications(mocker):
rs.llen.assert_called_once_with("message_queue")
rs.rpush.assert_called_once()
requeued_notification = json.loads(rs.rpush.call_args[0][1])
assert requeued_notification["id"] == 1
assert requeued_notification["id"] == '1'


def test_batch_insert_with_malformed_notifications(mocker):
Expand Down

0 comments on commit 2d0b01f

Please sign in to comment.