Other mixins fail due to overwritten self.object

Issue #6 new
Aaron de Bruyn
created an issue


self.object = self.model(**form.cleaned_data)

causes other mixins that modify self.object from succeeding.

An example: I am using django-subdomain-instances which has an 'InstanceFormMixin' that looks at the current subdomain and attaches the correct subdomain to an object. The associated subdomain is wiped out when self.object is overwritten.

Changing it to the following worked for me:

if not self.object:
    self.object = self.model(**form.cleaned_data)

Comments (0)

  1. Log in to comment