diff --git a/src/nalodeni/models.py b/src/nalodeni/models.py index a453e7a..0d4aebb 100644 --- a/src/nalodeni/models.py +++ b/src/nalodeni/models.py @@ -150,7 +150,7 @@ class AppUser(AbstractUser, DataAudited): ## # User self-editable fields ## - postcode = IntegerField(_('PSČ'), blank=False, null=True) + postcode = IntegerField(_('PSČ'), blank=True, null=True) city = CharField(_(u'Město'), max_length=120, default=None, blank=True, null=True) district = IntegerField(_('Kraj'), blank=True, null=True, diff --git a/src/nalodeni/people.py b/src/nalodeni/people.py index 8f36929..ae5750c 100644 --- a/src/nalodeni/people.py +++ b/src/nalodeni/people.py @@ -303,10 +303,12 @@ def person_edit(request, id): if request.method == "GET": form = _form(instance=obj) + form.fields['email_contact'].disabled = True elif request.method == "POST": with obj.audit_context(request.user) as ac: form = _form(request.POST, instance=obj) + form.fields['email_contact'].disabled = True if form.is_valid(): form.save()