🐛 Fix bugs

This commit is contained in:
2025-04-01 00:46:46 +08:00
parent a4ecf30c5b
commit 1cec1bf82e
5 changed files with 80 additions and 53 deletions

View File

@ -152,7 +152,7 @@ class KeyPairProvider {
Future<SnKeyPair?> reloadActive({bool autoEnroll = true}) async {
final kp = await (_dt.db.snLocalKeyPair.select()
..where((e) => e.accountId.equals(_ua.user!.id))
..where((e) => e.accountId.equals(_ua.user?.id ?? 0))
..where((e) => e.privateKey.isNotNull())
..where((e) => e.isActive.equals(true))
..limit(1))