Skip to content

Instantly share code, notes, and snippets.

@danilovmy
Created May 9, 2022 14:16
Show Gist options
  • Save danilovmy/da119deffe31a00bddb9f308cb7ec8f8 to your computer and use it in GitHub Desktop.
Save danilovmy/da119deffe31a00bddb9f308cb7ec8f8 to your computer and use it in GitHub Desktop.
wrapped save function of form to also save nested inlines
def save(self, *args, **kwargs):
return super().save(*args, **kwargs) or self.nested.formset.save(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment