mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Options cleanup
This commit is contained in:
parent
4c748b61a5
commit
4971491dfe
8 changed files with 28 additions and 28 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue