Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Fix smart album sync type error

Neeraj Gupta52bda55119a9
diff --git a/mobile/apps/photos/lib/services/smart_albums_service.dart b/mobile/apps/photos/lib/services/smart_albums_service.dart
index 176de31b3e..0ca66e8cbe 100644
--- a/mobile/apps/photos/lib/services/smart_albums_service.dart
+++ b/mobile/apps/photos/lib/services/smart_albums_service.dart
@@ -89,7 +89,11 @@ class SmartAlbumsService {
_logger.info("Syncing Smart Albums");
final cachedConfigs = await getSmartConfigs();
- final userId = Configuration.instance.getUserID()!;
+ final userId = Configuration.instance.getUserID();
+ if (userId == null) {
+ _logger.warning("No user ID, skipping smart album sync");
+ return;
+ }
for (final entry in cachedConfigs.entries) {
final collectionId = entry.key;