Skip to content

Commit

Permalink
Don't need address
Browse files Browse the repository at this point in the history
  • Loading branch information
sthapa committed Dec 10, 2024
1 parent 7452d65 commit 22a3173
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions froide/account/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,25 +309,11 @@ class UserChangeDetailsForm(forms.Form):
label=_("Your email address"),
)

address = forms.CharField(
max_length=300,
label=_("Your mailing address"),
help_text=_("Your address will never be displayed publicly."),
widget=forms.Textarea(
attrs={
"placeholder": _("Street, Post Code, City"),
"class": "form-control",
"rows": "3",
}
),
required=False,
)
field_order = ["email", "address"]
field_order = ["email"]

def __init__(self, user: SimpleLazyObject, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.user = user
self.fields["address"].initial = self.user.address
self.fields["email"].initial = self.user.email
self.order_fields(self.field_order)

Expand All @@ -336,7 +322,6 @@ def clean_email(self) -> str:
return email

def save(self) -> None:
self.user.address = self.cleaned_data["address"]
AccountService.check_against_blocklist(self.user, save=False)
self.user.save()

Expand Down

0 comments on commit 22a3173

Please sign in to comment.