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

Fix bulk importer updates #1745

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Fix bulk importer updates #1745

merged 1 commit into from
Feb 28, 2024

Conversation

actlikewill
Copy link
Contributor

  • This adds a method for calling the objects without defer in the fields for use in the importer

@actlikewill actlikewill marked this pull request as ready for review February 28, 2024 08:41
@actlikewill
Copy link
Contributor Author

@longhotsummer I'm thinking maybe it would have been better to leave the original queryset untouched and then have a manager with something like defered_objects so we can opt in to the defered qs when necessary

@@ -246,6 +246,9 @@ def get_queryset(self):
# defer expensive fields
return super().get_queryset().defer("content_html", "toc_json")

def get_qs_no_defer(self):
return super().get_queryset()

Copy link
Contributor Author

@actlikewill actlikewill Feb 28, 2024

Choose a reason for hiding this comment

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

@longhotsummer The change in the manager is necessary because Polymorphic doesn't like it when we do qs.defer(None)

@actlikewill actlikewill merged commit 97675fe into main Feb 28, 2024
9 checks passed
@actlikewill actlikewill deleted the importer branch February 28, 2024 09:47
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.

2 participants