4

I have a model Lecture with some m2m fields in it, which I would like to dump using dumpdata.

But whenever I call python manage.py dumpdata cms.lecture I get the following error

CommandError: Unable to serialize database: 'NoneType' object has no attribute '_meta'.

Is this because of the m2m-field or what could be the problem here?

My Database is MySql (version 5.6.12) and I'm using Django 1.5.1. I used Sqlite before and it worked fine.

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Magda
  • 1,218
  • 3
  • 14
  • 31

1 Answers1

1

Source :

Putting

self.serialize = False

into managers.py (around line 75) seems to fix the issue for me.

Edit: of course, adding it to the Field.init call as serialize=False is a much better idea.
Edit2: additionally null used to be set to True but now defaults to False and perhaps should also be added to the constructor.

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Up_One
  • 5,213
  • 3
  • 33
  • 65