Commit 42e80694 authored by Alaric Senat's avatar Alaric Senat Committed by Alaric Senat
Browse files

FakePersonaStore: Make sure the Postal Address isn't empty before submitting it to Folks

parent 74df8bc2
......@@ -474,8 +474,7 @@ PostalAddressDetails
var original = (Set<PostalAddressFieldDetails>) new_value;
var copy = new HashSet<PostalAddressFieldDetails> ();
foreach (var e in original) {
// TODO: make sure that the Postal Address isn't empty
if (e.value != null)
if (e.value != null && !e.value.is_empty ())
copy.add (new PostalAddressFieldDetails (e.value, e.parameters));
}
yield ((PostalAddressDetails) persona).change_postal_addresses (copy);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment