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

Remove deleted_by serializer field for Dataviews #2721

Merged
merged 7 commits into from
Oct 23, 2024
Merged

Remove deleted_by serializer field for Dataviews #2721

merged 7 commits into from
Oct 23, 2024

Conversation

FrankApiyo
Copy link
Member

@FrankApiyo FrankApiyo commented Oct 14, 2024

Changes / Features implemented

  • Exclude deleted_by serializer field
  • Filter out dataview that have already been deleted from the dataviews endpoint

Steps taken to verify this change does what is intended

Ran locally

Side effects of implementing this change

N/A

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #2720

@FrankApiyo FrankApiyo changed the title Customized deleted_by serializer field Customized deleted_by serializer field for Dataviews Oct 15, 2024
Copy link
Member

@ukanga ukanga left a comment

Choose a reason for hiding this comment

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

@FrankApiyo Why do we need the deleted_by field yet we do not expose to the user deleted records?
Could we exclude this field instead?

@FrankApiyo FrankApiyo requested a review from ukanga October 19, 2024 13:56
@FrankApiyo FrankApiyo force-pushed the fix-2720 branch 2 times, most recently from 570e254 to a3b56ee Compare October 22, 2024 06:09
Remove deleted DataViews
"""
return super().filter_queryset(
queryset.filter(deleted_at=None, deleted_by=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

@FrankApiyo Why do we need to filter by both, why not just use deleted_at?

@FrankApiyo FrankApiyo merged commit 4c8cba7 into main Oct 23, 2024
10 checks passed
@FrankApiyo FrankApiyo deleted the fix-2720 branch October 23, 2024 12:35
@kelvin-muchiri kelvin-muchiri changed the title Customized deleted_by serializer field for Dataviews Remove deleted_by serializer field for Dataviews Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants