Skip to content

Commit

Permalink
model: avoid setting value on getter
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcastro2 committed Nov 9, 2023
1 parent 05657e0 commit 1a822e5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions invenio_accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,6 @@ def email(self, email):
@hybrid_property
def user_profile(self):
"""Get the user profile."""
# NOTE: accessing this property requires an initialized app for config
if self._user_profile is None:
return None
elif not isinstance(self._user_profile, UserProfileDict):
return UserProfileDict(**self._user_profile)

return self._user_profile

@user_profile.setter
Expand All @@ -235,12 +229,6 @@ def user_profile(self, value):
@hybrid_property
def preferences(self):
"""Get the user preferences."""
# NOTE: accessing this property requires an initialized app for config
if self._preferences is None:
return None
elif not isinstance(self._preferences, UserPreferenceDict):
self._preferences = UserPreferenceDict(**self._preferences)

return self._preferences

@preferences.setter
Expand Down

0 comments on commit 1a822e5

Please sign in to comment.