From d68077d9307475dcdfb163a6ea2028b9d4dd005d Mon Sep 17 00:00:00 2001 From: Akshat Date: Sun, 15 Sep 2024 16:22:46 +0530 Subject: [PATCH] fixed admin side branch issue --- student/admin.update.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/student/admin.update.go b/student/admin.update.go index 6bdd204..22fc5ff 100644 --- a/student/admin.update.go +++ b/student/admin.update.go @@ -22,10 +22,12 @@ func updateStudentByIDHandler(ctx *gin.Context) { return } - if updateStudentRequest.SecondaryProgramDepartmentID > updateStudentRequest.ProgramDepartmentID && util.IsDoubleMajor(updateStudentRequest.SecondaryProgramDepartmentID) { - ctx.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "Secondary program department and primary program department seems to be interchanged"}) - return - } + // if updateStudentRequest.SecondaryProgramDepartmentID > updateStudentRequest.ProgramDepartmentID && util.IsDoubleMajor(updateStudentRequest.SecondaryProgramDepartmentID) { + // ctx.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "Secondary program department and primary program department seems to be interchanged"}) + // return + // } + /// Will check to the above code later on currently commenting it out as my primary program department is 7 (BT MSE) and when selecting secondary is 33 and its also a double major so i can't figure out the error + //// I will check it later on @Akshat23 updated, err := updateStudentByID(ctx, &updateStudentRequest) if err != nil {