summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Reitter <travis.reitter@collabora.co.uk>2011-10-20 05:42:51 (GMT)
committerTravis Reitter <travis.reitter@collabora.co.uk>2011-10-24 18:34:16 (GMT)
commitff098f0adbfbfc91545b07ae632833929c897d9c (patch)
tree730936c3c48ab84f40ff6cc22329c8c602c664e8
parent9bb9f634a128052356e320c903a172a9cbe837c8 (diff)
downloadfolks-ff098f0adbfbfc91545b07ae632833929c897d9c.tar.gz
folks-ff098f0adbfbfc91545b07ae632833929c897d9c.tar.xz
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.
-rw-r--r--backends/eds/lib/edsf-persona.vala8
1 files changed, 4 insertions, 4 deletions
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);
}