Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log errors during faculty processing #659

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions main/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
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 +163,6 @@ def process_faculties(self, faculties):
continue

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