-
Notifications
You must be signed in to change notification settings - Fork 208
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
CommandError: Unable to serialize database: 'MultiSelectField' object has no attribute '_get_val_from_obj' #74
Comments
This project doesn't support Django 2.0+ yet. I'll happily accept PRs for it though. This project is also a dirty hack - if you will ever do any filtering on the I'll leave this issue open until the project is compatible with Django 2.0. Thanks! |
What would be the first steps to making this compatible with Django 2.0? I'm happy to do some research and help where I can. The error I am getting starts with |
@CodyBontecou to make it work with Django 2.0 you can simply change one line in |
I've started a branch and PR for Django 2.0 compatibility: #77. It's currently running into issues and I don't have time to debug all of it right now. Help wanted. |
Is this bug still live? I use master branch version (0.1.8) on Django 2.0.5, but have Way to solve it? |
Apply this patch: goinnn#74 (comment)
If you just want to fix this particular issue in Django >2.0 before the PR is merged and still want a clean from multiselectfield import MultiSelectField
class PatchedMultiSelectField(MultiSelectField):
def value_to_string(self, obj):
value = self.value_from_object(obj)
return self.get_prep_value(value) and use that in your model. |
I think this can be closed as the changes of #99 are already released with v0.1.10? |
When trying to
dumpdata
with a model that usesmultiselectfield
in Django 2.0 I get this … is this me doing something wrong or something to do withmultiselectfield
? Thanks for any insight and formultiselectfield
!The text was updated successfully, but these errors were encountered: