Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audit log field to RetrieveEYBLeadSerializer #5965

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

oliverjwroberts
Copy link
Contributor

Description of change

This PR refactors audit.py to provide both a serialiser field and viewset. It then adds the audit log serialiser field to the RetrieveEYBLeadSerializer. The response will now include a field similar to the following:

    "audit_log": [
        {
            "id": 622,
            "user": null,
            "timestamp": "2025-02-18T07:00:00.123456Z",
            "comment": "",
            "changes": {
                "address_1": [
                    "Old address 1",
                    "New address 1"
                ]
            }
        }
    ]

Checklist

  • Has this branch been rebased on top of the current main branch?

    Explanation

    The branch should not be stale or have conflicts at the time reviews are requested.

  • Is the CircleCI build passing?

General points

Other things to check

  • Make sure fixtures/test_data.yaml is maintained when updating models
  • Consider the admin site when making changes to models
  • Use select-/prefetch-related field lists in views and search apps, and update them when fields are added
  • Make sure the README is updated e.g. when adding new environment variables

See docs/CONTRIBUTING.md for more guidelines.

@oliverjwroberts oliverjwroberts self-assigned this Feb 18, 2025
@oliverjwroberts oliverjwroberts requested a review from a team as a code owner February 18, 2025 09:29
@oliverjwroberts oliverjwroberts force-pushed the feature/CLS2-1268-add-eyb-lead-audit branch from cfc4cf3 to b55e2b3 Compare February 18, 2025 09:48
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.66%. Comparing base (4c93e3c) to head (b55e2b3).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5965   +/-   ##
=======================================
  Coverage   96.65%   96.66%           
=======================================
  Files        1079     1079           
  Lines       25353    25383   +30     
  Branches     1673     1675    +2     
=======================================
+ Hits        24505    24536   +31     
  Misses        691      691           
+ Partials      157      156    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliverjwroberts oliverjwroberts merged commit 7ba24e6 into main Feb 18, 2025
7 checks passed
@oliverjwroberts oliverjwroberts deleted the feature/CLS2-1268-add-eyb-lead-audit branch February 18, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants