title: Django pre-save function not removing group and users permissions from user model in django signal
body: <p>I am trying to write a signal function as below:</p>
  <pre class="lang-py prettyprint-override"><code>@receiver(post_save, sender=User)
  def on_user_deactivation(sender, instance, **kwargs):
      if not instance.is_active:
          instance.team_set.clear()
          instance.groups.clear()
          instance.user_permissions.clear()
  </code></pre>