Set default theme if not set
This commit is contained in:
		
							parent
							
								
									51a5c473ae
								
							
						
					
					
						commit
						08845922f4
					
				| 
						 | 
				
			
			@ -49,6 +49,8 @@ proc getPrefs*(id: string; cfg: Config): Prefs =
 | 
			
		|||
  withDb:
 | 
			
		||||
    try:
 | 
			
		||||
      result.getOne("id = ?", id)
 | 
			
		||||
      if result.theme.len == 0:
 | 
			
		||||
        result.theme = cfg.defaultTheme
 | 
			
		||||
    except KeyError:
 | 
			
		||||
      result = getDefaultPrefs(cfg)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue