summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-11-12 10:22:31 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-11-12 10:22:56 (GMT)
commit7b064eb52225198dbc3c41aa88b9010bb24d5ebc (patch)
tree785a72856986b6d33151d0bd26144e372f575739
parent07ce68b617e27c5b78ed7af49fe07605f8100482 (diff)
downloadlibkolab-7b064eb52225198dbc3c41aa88b9010bb24d5ebc.tar.gz
Only set the affiliation if it is not empty.
Otherwise we get lots of log messages from libkolabxml for skipping empty affiliations.
-rw-r--r--conversion/kabcconversion.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/conversion/kabcconversion.cpp b/conversion/kabcconversion.cpp
index 566652f..76d9597 100644
--- a/conversion/kabcconversion.cpp
+++ b/conversion/kabcconversion.cpp
@@ -660,7 +660,9 @@ Kolab::Contact fromKABC(const KABC::Addressee &addressee)
if (!relateds.empty()) {
businessAff.setRelateds(relateds);
}
- c.setAffiliations(std::vector<Kolab::Affiliation>() << businessAff);
+ if (!(businessAff == Kolab::Affiliation())) {
+ c.setAffiliations(std::vector<Kolab::Affiliation>() << businessAff);
+ }
std::vector<Kolab::Url> urls;
if (!addressee.url().isEmpty()) {