diff --git a/accounts/models.py b/accounts/models.py index ac3aad9f..de41cb0d 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -6,6 +6,10 @@ from allauth.account.signals import user_signed_up from .lists import USER_TYPES_CHOICES, LMS_MODULES_CHOICES +import logging + +# Initialise instance of a logger to handle error logging +logger = logging.getLogger(__name__) class Profile(models.Model): @@ -52,7 +56,7 @@ def save(self, *args, **kwargs): self.slack_display_name = self.user.profile.slack_display_name self.user_type = self.user.profile.user_type self.current_lms_module = self.user.profile.current_lms_module - + logger.exception(str(KeyError)) super(Profile, self).save(*args, **kwargs) def __str__(self): diff --git a/templates/includes/navbar.html b/templates/includes/navbar.html index 11949531..2fdba975 100644 --- a/templates/includes/navbar.html +++ b/templates/includes/navbar.html @@ -39,11 +39,13 @@ My Account