Skip to content

Commit

Permalink
making course code regex more strict to reduce false postive matches …
Browse files Browse the repository at this point in the history
…that need db query
  • Loading branch information
idugan100 committed Apr 25, 2024
1 parent 0e56a03 commit 61ab707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion home/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61ab707

Please sign in to comment.