fixed variable usage for userID.

This commit is contained in:
wknet123 2016-03-08 11:17:09 +08:00
parent 242f5f0972
commit 46c8ef142f

View File

@ -67,9 +67,9 @@ func (idc *ItemDetailController) Get() {
userID := sessionUserID.(int) userID := sessionUserID.(int)
idc.Data["Username"] = idc.GetSession("username") idc.Data["Username"] = idc.GetSession("username")
idc.Data["UserId"] = sessionUserID.(int) idc.Data["UserId"] = userID
roleList, err := dao.GetUserProjectRoles(models.User{UserID: sessionUserID.(int)}, projectID) roleList, err := dao.GetUserProjectRoles(models.User{UserID: userID}, projectID)
if err != nil { if err != nil {
beego.Error("Error occurred in GetUserProjectRoles:", err) beego.Error("Error occurred in GetUserProjectRoles:", err)
idc.CustomAbort(http.StatusInternalServerError, "Internal error.") idc.CustomAbort(http.StatusInternalServerError, "Internal error.")