Skip to content

Commit

Permalink
feat: log errors during faculty processing
Browse files Browse the repository at this point in the history
  • Loading branch information
tymees committed Apr 18, 2024
1 parent bf18776 commit 6567aa8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import logging

from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _

logger = logging.getLogger("ethics.main")

class YesNoDoubt(models.TextChoices):
YES = "Y", _("ja")
Expand Down Expand Up @@ -159,6 +162,6 @@ def process_faculties(self, faculties):
continue

faculty_obj.users.add(self)
except:
# Just ignore any errors...
except Exception as e:
logger.error(f"Error processing faculty for user: {e}", exc_info=True)
continue

0 comments on commit 6567aa8

Please sign in to comment.