fix #79
This commit is contained in:
parent
ec1eacb3cd
commit
6452dbd66a
2 changed files with 2 additions and 1 deletions
|
@ -88,6 +88,7 @@ def create_course(token):
|
|||
#check if name already exists
|
||||
try:
|
||||
query = Course.all()
|
||||
query.filter('campusId = ', payload['campusId'])
|
||||
query.filter("courseName = ", payload['courseName'])
|
||||
for c in query.run(limit=1):
|
||||
return forbidden("Course with same name already exists")
|
||||
|
|
|
@ -14,7 +14,7 @@ class Course(db.Model):
|
|||
|
||||
def to_JSON(self):
|
||||
data = {'courseName' : self.courseName,
|
||||
'campusId' : self.campusName,
|
||||
'campusId' : self.campusId,
|
||||
'master_id' : self.master_id,
|
||||
# 'projects' : self.projects,
|
||||
'startDate' : {
|
||||
|
|
Loading…
Reference in a new issue