fix(calendar): generate missing UID when importing calendar

This commit is contained in:
Francis Lachapelle committed 2021-09-07 14:25:17 -04:00
1 parent 9f38201b6c
commit e43a721f77
1 file changed
+2 -1
@@ -3367,7 +3367,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
// we generate a new UID based on a GUID
uid = [event uid];
if ([uid rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @"+/"]].location != NSNotFound)
if (![uid length] ||
[uid rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @"+/"]].location != NSNotFound)
{
uid = [self globallyUniqueObjectId];
[event setUid: uid];