def update_user(self, save=True, **kwargs): if save and self.set_analytics_enabled: analytics_enabled = self.cleaned_data['analytics_enabled'] if self.user.analytics_enabled != analytics_enabled: set_analytics_opt_out(self.user, analytics_enabled) return super(UpdateMyAccountInfoForm, self).update_user(save=save, **kwargs)
def update_user(self, save=True, **kwargs): if save and self.set_analytics_enabled: analytics_enabled = self.cleaned_data['analytics_enabled'] if self.user.analytics_enabled != analytics_enabled: set_analytics_opt_out(self.user, analytics_enabled) return super(UpdateMyAccountInfoForm, self).update_user(save=save, **kwargs)