From: Travis Reitter Date: Thu, 20 Oct 2011 05:42:51 +0000 (-0700) Subject: Only add non-empty Role components to Edsf.Personas. X-Git-Tag: FOLKS_0_6_5~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff098f0adbfbfc91545b07ae632833929c897d9c;p=platform%2Fupstream%2Ffolks.git Only add non-empty Role components to Edsf.Personas. The EDS test "set-roles" was failing because some empty parameters were getting added to Edsf.Personas, thus failing parameter equality checks. Helps: bgo#662433 - AbstractFieldDetails.equal() is ambiguous about checking parameters. --- diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala index 382a347..0ec63f0 100644 --- a/backends/eds/lib/edsf-persona.vala +++ b/backends/eds/lib/edsf-persona.vala @@ -972,16 +972,16 @@ public class Edsf.Persona : Folks.Persona, default_role = new RoleFieldDetails (new_role); - if (org_unit != null) + if (org_unit != null && org_unit != "") default_role.set_parameter ("org_unit", org_unit); - if (office != null) + if (office != null && office != "") default_role.set_parameter ("office", office); - if (manager != null) + if (manager != null && manager != "") default_role.set_parameter ("manager", manager); - if (assistant != null) + if (assistant != null && manager != "") default_role.set_parameter ("assistant", assistant); }