Fix for identifying children for netmail packets
This commit is contained in:
parent
5ca6c8126e
commit
72fb8044f9
@ -321,7 +321,7 @@ class Address extends Model
|
|||||||
*/
|
*/
|
||||||
public function getNetmail(): ?Packet
|
public function getNetmail(): ?Packet
|
||||||
{
|
{
|
||||||
if (($x=Netmail::whereIn('tftn_id',$this->children->pluck('id')->push($this->id))
|
if (($x=Netmail::whereIn('tftn_id',(($x=$this->children) ? $x->pluck('id') : collect())->push($this->id))
|
||||||
->where(function($q) {
|
->where(function($q) {
|
||||||
return $q->whereNull('sent')
|
return $q->whereNull('sent')
|
||||||
->orWhere('sent',FALSE);
|
->orWhere('sent',FALSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user