Ticket #8134: intermediaryfixtures.diff

File intermediaryfixtures.diff, 715 bytes (added by killiands, 16 years ago)

Patch proposal

  • django/core/serializers/base.py

     
    168168        models.Model.save_base(self.object, raw=True)
    169169        if self.m2m_data and save_m2m:
    170170            for accessor_name, object_list in self.m2m_data.items():
    171                 setattr(self.object, accessor_name, object_list)
     171                if not getattr(self.object, accessor_name).through:
     172                    setattr(self.object, accessor_name, object_list)
    172173
    173174        # prevent a second (possibly accidental) call to save() from saving
    174175        # the m2m data twice.
Back to Top