Commit ab2de6fb authored by Cameron Grant's avatar Cameron Grant

fix for Mailing list tab not working is there are no Mailing lists or Recipients.

Signed-off-by: default avatarCameron Grant <sasky.creative@gmail.com>
parent 2a3229f1
......@@ -114,6 +114,9 @@ class MailingList extends DataObject {
* Returns all recipients who aren't blacklisted, and are verified.
*/
public function ActiveRecipients() {
if($this->Recipients() instanceof UnsavedRelationList ) {
return new ArrayList();
}
return $this->Recipients()->exclude('Blacklisted', 1)->exclude('Verified', 0);
}
}
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