Skip to content

Commit

Permalink
fix encode error for shib institution attr (#6613)
Browse files Browse the repository at this point in the history
  • Loading branch information
imwhatiam authored Aug 22, 2024
1 parent a2cd02f commit ff3d7b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions thirdpart/shibboleth/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

from seahub import auth
from seahub.base.accounts import User
from seahub.auth.models import SocialAuthUser
from seahub.base.sudo_mode import update_sudo_mode_ts
from seahub.profile.models import Profile
from seahub.utils.file_size import get_quota_from_string
from seahub.role_permissions.utils import get_enabled_role_permissions_by_role
Expand Down Expand Up @@ -179,7 +177,7 @@ def make_profile(self, user, shib_meta):
p.nickname = nickname.encode("iso-8859-1").decode('utf8')

if institution:
p.institution = institution
p.institution = institution.encode("iso-8859-1").decode('utf8')

if contact_email:
p.contact_email = contact_email
Expand Down

0 comments on commit ff3d7b8

Please sign in to comment.