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

operation logs: anonymization respects jsonschema #3416

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

PascalRepond
Copy link
Contributor

@PascalRepond PascalRepond commented Jul 25, 2023

  • Existing invalid data will be corrected manually as an Alembic script would take 5 days to run with several million operation logs.

Why are you opening this PR?

  • Which task/US does it implement?
  • Which issue does it fix?

Dependencies

My PR depends on the following rero-ils-ui's PR(s):

  • rero/rero-ils-ui#

How to test?

  • What command should I have to run to test your PR?
  • What should I test through the UI?

@github-actions github-actions bot added f: circulation Concerns the circulation interface or backend f: activity-logs Everything around logging user or system activities labels Jul 25, 2023
@PascalRepond PascalRepond force-pushed the rep-operation-logs branch 2 times, most recently from 14cbbdd to cc2748c Compare July 25, 2023 07:55
@PascalRepond PascalRepond self-assigned this Jul 25, 2023
record = OperationLog.get_record(uuid)
LOGGER.info(f'[{idx}/{len(uuids)}] Processing Log#{record.pid} '
f'[{record.id}]...')
record['patron']['name'] = 'anonymized'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be:

record['loan']['patron']['name'] = 'anonymized'
record['loan']['patron']['pid'] = 'anonymized'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, thanks!

* Existing invalid data should be corrected manually.

Co-authored-by: Pascal Repond <pascal.repond@rero.ch>
@PascalRepond PascalRepond requested a review from rerowep August 8, 2023 09:45
@PascalRepond PascalRepond merged commit 2025ad8 into rero:staging Aug 17, 2023
@PascalRepond PascalRepond deleted the rep-operation-logs branch August 17, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: activity-logs Everything around logging user or system activities f: circulation Concerns the circulation interface or backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants