fix:修复轨迹更新的比较逻辑错误

This commit is contained in:
hardstylewyl 2025-01-10 09:18:23 +08:00
parent f5f9227aeb
commit b2c7a6aef1

View File

@ -272,8 +272,11 @@ public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
existTracks = existTracks.Where(x =>
{
var oldExtraDict = GetExtraDictForTextJson(x.Extra);
// tips:注意兼容性,历史轨迹的字段可能为空
if (x.Extra == null || !extraDict.TryGetValue(@event.CompareFields, out var oldValue))
if (x.Extra == null
|| oldExtraDict == null
|| !oldExtraDict.TryGetValue(@event.CompareFields, out var oldValue))
{
return false;
}