From 61ab707272ebfa5242474cb6bfae9ecf3a40edb6 Mon Sep 17 00:00:00 2001 From: idugan100 Date: Thu, 25 Apr 2024 14:54:05 -0400 Subject: [PATCH] making course code regex more strict to reduce false postive matches that need db query --- home/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/models.py b/home/models.py index 2a82d32..ff80310 100644 --- a/home/models.py +++ b/home/models.py @@ -200,7 +200,7 @@ class Course(Model): recent = RecentCourseManager() unfiltered = Manager() - course_code_format = '[A-Za-z]{4}(?:[A-Za-z]|[0-9]){3,6}' + course_code_format = '[A-Za-z]{4}(?:[0-9]){3,6}' def save(self, *args, **kwargs): # `name` is essentially a computed field, and will never have a value