temp: add some logging around extended profile update functionality
I am trying to persist/save data through an "extended profile field" in Stage but the data isn't saving. I have this working locally with devstack but don't understand why it's not working in Stage. This PR adds some logging so I can do some debugging in Stage and try and pinpoint if/where the issue is occurring.
This commit is contained in:
@@ -602,15 +602,18 @@ class UserProfile(models.Model):
|
||||
return self.__enumerable_to_display(self.GENDER_CHOICES, self.gender)
|
||||
|
||||
def get_meta(self): # pylint: disable=missing-function-docstring
|
||||
log.info(f"[Extended Profile] Retrieving user profile meta data for user {self.user.id}")
|
||||
js_str = self.meta
|
||||
if not js_str:
|
||||
js_str = {}
|
||||
else:
|
||||
js_str = json.loads(self.meta)
|
||||
|
||||
log.info(f"[Extended Profile] Returning user profile meta data for user {self.user.id} with data [{js_str}]")
|
||||
return js_str
|
||||
|
||||
def set_meta(self, meta_json):
|
||||
log.info(f"[Extended Profile] Updating user profile meta data for user {self.user.id} with: [{meta_json}]")
|
||||
self.meta = json.dumps(meta_json)
|
||||
|
||||
def set_login_session(self, session_id=None):
|
||||
|
||||
Reference in New Issue
Block a user