From 62f624792540edf49255058f14dc87d6384ff513 Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Wed, 20 Nov 2019 15:21:21 +0100
Subject: [PATCH] Reinvent the whell because Django is a jerk.

---
 biscuit/apps/alsijil/models.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/biscuit/apps/alsijil/models.py b/biscuit/apps/alsijil/models.py
index 4f5343024..309d5b5e7 100644
--- a/biscuit/apps/alsijil/models.py
+++ b/biscuit/apps/alsijil/models.py
@@ -4,6 +4,10 @@ from django.utils.translation import ugettext_lazy as _
 from biscuit.core.mixins import SchoolRelated
 
 
+def isidentifier(value: str) -> bool:
+    return value.isidentifier()
+
+
 class PersonalNote(SchoolRelated):
     """ A personal note about a single person. Used in the class register to note
     absences, excuses and remarks about a student in a single lesson period.
@@ -48,7 +52,7 @@ class PersonalNoteFilter(SchoolRelated):
     """ A filter definition that can generate statistics on personal note texts. """
 
     identifier = models.CharField(verbose_name=_('Identifier'), max_length=30,
-                                  validators=[str.isidentifier])
+                                  validators=[isidentifier])
     description = models.CharField(verbose_name=_('Description'), max_length=60, blank=True)
 
     regex = models.CharField(verbose_name=_('Match expression'), max_length=100)
-- 
GitLab