diff --git a/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py b/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py new file mode 100644 index 00000000000..0a4c6c8fb47 --- /dev/null +++ b/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-03-01 17:30 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0005_migrate-old-passwords'), + ] + + operations = [ + migrations.RemoveField( + model_name='userprofile', + name='allow_email', + ), + ] diff --git a/readthedocs/core/models.py b/readthedocs/core/models.py index 45a0cc42c48..d129f181a5e 100644 --- a/readthedocs/core/models.py +++ b/readthedocs/core/models.py @@ -32,11 +32,6 @@ class UserProfile(models.Model): help_text=_('If unchecked, you will still see community ads.'), default=True, ) - allow_email = models.BooleanField( - _('Allow email'), - help_text=_('Show your email on VCS contributions.'), - default=True, - ) def __str__(self): return ( @@ -49,19 +44,3 @@ def get_absolute_url(self): 'profiles_profile_detail', kwargs={'username': self.user.username}, ) - - def get_contribution_details(self): - """ - Get the line to put into commits to attribute the author. - - Returns a tuple (name, email) - """ - if self.user.first_name and self.user.last_name: - name = '{} {}'.format(self.user.first_name, self.user.last_name) - else: - name = self.user.username - if self.allow_email: - email = self.user.email - else: - email = STANDARD_EMAIL - return (name, email)