Options cleanup

This commit is contained in:
Zed
2019-09-18 20:54:07 +02:00
parent 4c748b61a5
commit 4971491dfe
8 changed files with 28 additions and 28 deletions

View File

@@ -29,9 +29,9 @@ proc hasCachedProfile*(username: string): Option[Profile] =
try:
let p = Profile.getOne("lower(username) = ?", toLower(username))
doAssert not p.isOutdated
result = some(p)
result = some p
except AssertionError, KeyError:
result = none(Profile)
result = none Profile
proc getCachedProfile*(username, agent: string; force=false): Future[Profile] {.async.} =
withDb: