django-db-constraints icon indicating copy to clipboard operation
django-db-constraints copied to clipboard

Unable to migrate: "TypeError: reload_model() got an unexpected keyword argument 'delay'"

Open gregbrowndev opened this issue 7 years ago • 2 comments

Hi, I am unable to migrate due to reload_model called with incorrect arguments, specifically delay is passed in but this is not in the function parameter list.

In AlterConstraints:

def state_forwards(self, app_label, state):
        model_state = state.models[app_label, self.name_lower]
        model_state.options[self.option_name] = self.db_constraints
        state.reload_model(app_label, self.name_lower, delay=True)

Getting error: "TypeError: reload_model() got an unexpected keyword argument 'delay'".

Currently on:

  • Django (1.10.8)
  • django-db-constraints (0.3.0)

If its just a versioning issue can you tell me which version of Django to use? Thanks

gregbrowndev avatar Oct 28 '17 15:10 gregbrowndev

Updating to Django (1.11.6) resolved the issue

gregbrowndev avatar Oct 28 '17 15:10 gregbrowndev

Hi @reggie43

Thanks for identifying the issue & cause!

shangxiao avatar Oct 29 '17 04:10 shangxiao