Navigation Menu

Skip to content

Commit

Permalink
[buteo-sync-plugins-social] Don't set recurrence on upsync if none ex…
Browse files Browse the repository at this point in the history
…ists. Contributes to MER#1392

Previously, an empty recurrence array could be set on upsync, which
would cause the upsync to fail due to the invalid array value.
This commit ensures that we detect that case and avoid upsyncing the
invalid empty array value.

Contributes to MER#1392
  • Loading branch information
Chris Adams committed Oct 28, 2015
1 parent 0e67222 commit 3699617
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/google/google-calendars/googlecalendarsyncadaptor.cpp
Expand Up @@ -382,7 +382,12 @@ QJsonObject kCalToJson(KCalCore::Event::Ptr event, KCalCore::ICalFormat &icalFor

QJsonObject retn;
if (!eventId.isEmpty()) retn.insert(QLatin1String("id"), eventId);
if (event->recurrence()) retn.insert(QLatin1String("recurrence"), recurrenceArray(event, icalFormat));
if (event->recurrence()) {
QJsonArray recArray = recurrenceArray(event, icalFormat);
if (recArray.size()) {
retn.insert(QLatin1String("recurrence"), recArray);
}
}
retn.insert(QLatin1String("summary"), event->summary());
retn.insert(QLatin1String("description"), event->description());
retn.insert(QLatin1String("location"), event->location());
Expand Down

0 comments on commit 3699617

Please sign in to comment.