Don't cache empty default prefs
This commit is contained in:
parent
d7e0fa6059
commit
f1d566fff6
|
@ -39,7 +39,6 @@ proc getPrefs*(id: string): Prefs =
|
||||||
result.getOne("id = ?", id)
|
result.getOne("id = ?", id)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
result = genDefaultPrefs()
|
result = genDefaultPrefs()
|
||||||
cache(result)
|
|
||||||
|
|
||||||
proc resetPrefs*(prefs: var Prefs) =
|
proc resetPrefs*(prefs: var Prefs) =
|
||||||
var defPrefs = genDefaultPrefs()
|
var defPrefs = genDefaultPrefs()
|
||||||
|
|
Loading…
Reference in New Issue