-
Notifications
You must be signed in to change notification settings - Fork 429
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
feat(audit): add change details to AuditLog #3218
feat(audit): add change details to AuditLog #3218
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
230f86e
to
77731c5
Compare
Uffizzi Preview |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3218 +/- ##
===========================================
- Coverage 95.90% 77.21% -18.70%
===========================================
Files 1062 1036 -26
Lines 32357 31602 -755
===========================================
- Hits 31033 24401 -6632
- Misses 1324 7201 +5877 ☔ View full report in Codecov by Sentry. |
11b20d9
to
a09b4cf
Compare
api/audit/serializers.py
Outdated
@swagger_serializer_method( | ||
serializer_or_field=AuditLogChangeDetailsSerializer(many=True) | ||
) | ||
def get_change_details(self, instance: AuditLog) -> typing.List[typing.Dict]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def get_change_details(self, instance: AuditLog) -> typing.List[typing.Dict]: | |
def get_change_details(self, instance: AuditLog) -> typing.List[typing.Dict[str, typing.Any]: |
2f6d68a
to
8f0ac30
Compare
Changes
This PR adds the change details to the API when retrieving a record from the AuditLog. To achieve this, I have added a new endpoint to retrieve an individual AuditLog record which includes a new
change_details
attribute in the JSON response.The
change_details
attribute contains a list, representing fields that have changed, e.g:How did you test this code?
Added 'integration' style tests for common use cases.