fix: fetch from cgroup and check if preHash is empty

This commit is contained in:
Prateek Sunal
2025-06-23 18:13:31 +05:30
parent 7719c4604e
commit b6ea502bc3

View File

@@ -225,13 +225,16 @@ class EntityService {
String preHash = "";
for (final id in personIds) {
final entity = await getEntity(EntityType.person, id);
final entity = await getEntity(EntityType.cgroup, id);
if (entity != null) {
preHash = "$id:${entity.updatedAt}_";
}
}
if (preHash.isEmpty) {
return "";
}
final hash = md5.convert(utf8.encode(preHash)).toString().substring(0, 10);
return hash;
}