Skip to content

Commit

Permalink
Merge pull request #397 from anyeone/master
Browse files Browse the repository at this point in the history
fixed error causing createsuperuser to fail for later versions of django
  • Loading branch information
bernardopires committed Oct 8, 2016
2 parents ba73de4 + 8774cd4 commit fe35aeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tenant_schemas/management/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import django
from django.conf import settings
from django.core.management import call_command, get_commands, load_command_class
from django.core.management.base import BaseCommand, CommandError
Expand Down Expand Up @@ -120,7 +121,8 @@ class variable COMMAND_NAME of the subclass.
def __new__(cls, *args, **kwargs):
obj = super(TenantWrappedCommand, cls).__new__(cls, *args, **kwargs)
obj.command_instance = obj.COMMAND()
obj.option_list = obj.command_instance.option_list
if django.VERSION <= (1,10,0):
obj.option_list = obj.command_instance.option_list
return obj

def add_arguments(self, parser):
Expand Down

0 comments on commit fe35aeb

Please sign in to comment.