django-pandas icon indicating copy to clipboard operation
django-pandas copied to clipboard

Bug: `read_frame` does not work if at least one manager is not named "objects"

Open EmperorArthur opened this issue 4 years ago • 0 comments

This means if a custom manager is used, without using the extremely generic "objects" the whole thing does not work.

Suggested Fix

The real problem is in utils.replace_pk.

The fix is to replace model.objects with model._meta.default_manager. This is how I believe Django does things internally when a manager is not specified.

EmperorArthur avatar Feb 05 '21 19:02 EmperorArthur