From 047585562e1950713b0c6d73f6bd7939ab50e744 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sat, 27 Jan 2018 19:36:26 +0100
Subject: [PATCH] Fix validation in courseList

---
 public/javascripts/courseList.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public/javascripts/courseList.js b/public/javascripts/courseList.js
index ae1f1d8..238c1fc 100644
--- a/public/javascripts/courseList.js
+++ b/public/javascripts/courseList.js
@@ -20,7 +20,7 @@ window.onload = function() {
 				if (!admin)
 					return;
 				// modal, fill code and description
-				let error = Validator.checkCode(this.newCourse.code);
+				let error = Validator.checkObject({code:this.newCourse.code}, "Course");
 				if (!!error)
 					return alert(error);
 				else
-- 
2.44.0