Fix error when DEBUG = True.

Seems that with this setting the admin use the class object and not the
instance.