Use Rep[U].run method

This commit is contained in:
Naoki Takezoe
2016-08-13 13:05:08 +09:00
parent 161e6dc809
commit 4eba7070da
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ trait AccessTokenService {
do {
token = makeAccessTokenString
hash = tokenToHash(token)
} while (Query(AccessTokens.filter(_.tokenHash === hash.bind).exists).first)
} while (AccessTokens.filter(_.tokenHash === hash.bind).exists.run)
val newToken = AccessToken(
userName = userName,
note = note,

View File

@@ -111,7 +111,7 @@ trait PullRequestService { self: IssuesService =>
*/
def updatePullRequests(owner: String, repository: String, branch: String)(implicit s: Session): Unit =
getPullRequestsByRequest(owner, repository, branch, false).foreach { pullreq =>
if(Query(Repositories.filter(_.byRepository(pullreq.userName, pullreq.repositoryName)).exists).first){
if(Repositories.filter(_.byRepository(pullreq.userName, pullreq.repositoryName)).exists.run){
val (commitIdTo, commitIdFrom) = JGitUtil.updatePullRequest(
pullreq.userName, pullreq.repositoryName, pullreq.branch, pullreq.issueId,
pullreq.requestUserName, pullreq.requestRepositoryName, pullreq.requestBranch)