From b6c28988a8bf00d46152eebc8add2eb2c85b317e Mon Sep 17 00:00:00 2001 From: Filip Stenbacka Date: Sun, 8 Sep 2024 16:37:24 +0300 Subject: [PATCH 01/27] Fixed LDAPError import error. --- teknologr/members/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/teknologr/members/views.py b/teknologr/members/views.py index 86cd48d..82b999c 100644 --- a/teknologr/members/views.py +++ b/teknologr/members/views.py @@ -6,10 +6,11 @@ from members.programmes import DEGREE_PROGRAMME_CHOICES from registration.models import Applicant from registration.forms import RegistrationForm -from api.ldap import LDAPAccountManager +from api.ldap import LDAPAccountManager, LDAPError_to_string from api.bill import BILLAccountManager from getenv import env from locale import strxfrm +from ldap import LDAPError def set_side_context(context, category, active_obj=None): @@ -76,8 +77,6 @@ def member(request, member_id): if request.method == 'POST': form = MemberForm(request.POST, instance=member) if form.is_valid(): - from ldap import LDAPError - from api.ldap import LDAPError_to_string try: form.save() except LDAPError as e: From c9d54fca380c7a274704f24a09936c9e1e37197e Mon Sep 17 00:00:00 2001 From: Filip Stenbacka Date: Sun, 8 Sep 2024 16:41:02 +0300 Subject: [PATCH 02/27] Removed residue from old Member.mobile_phone field. --- teknologr/katalogen/templates/profile.html | 8 +------- teknologr/members/templates/member.html | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/teknologr/katalogen/templates/profile.html b/teknologr/katalogen/templates/profile.html index b3baaa3..8fc6c7a 100644 --- a/teknologr/katalogen/templates/profile.html +++ b/teknologr/katalogen/templates/profile.html @@ -21,13 +21,7 @@

Telefonnummer - - {% if person.mobile_phone %} - {{person.mobile_phone}} - {% else %} - {{person.phone}} - {% endif %} - + {{person.phone}} E-postadress diff --git a/teknologr/members/templates/member.html b/teknologr/members/templates/member.html index a18a614..7b70368 100644 --- a/teknologr/members/templates/member.html +++ b/teknologr/members/templates/member.html @@ -86,7 +86,7 @@