Hi,

I am overriding a save function of a model with the following code:

    def save(self, *args, **kwargs):
        if (not self.id) and self.email != '':
            self.create_user()
        if hasattr(self, 'user'):
            self.user.email = self.email
            self.user.first_name = self.voornaam
            self.user.last_name = " ".join((self.tussenvoegsel,
self.achternaam))
            self.user.save()
        super(Lid, self).save(*args, **kwargs)

where Lid is the name of the Model. However, for some reason it throws the
following error since a while (don't know since when, don't know what
changed, can't find anything suspicious in hg log...) "super() argument 1
must be type, not None". When I run with pdb.set_trace as the first line of
the save method in the dev server, I can see that Lid is indeed None. What
is surprising is that ALL my imports are None (User, datetime, models,
etc.). I vaguely remember encountering this error before, but I don't
remember what I did to fix it. What could have overridden all those things
with None?

Does anybody have any clues? I can post my whole models.py if necessary, but
it's rather large.

Thanks,

Tino

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to