Fix removing from not default segments
[MAILPOET-3378]
This commit is contained in:
@ -161,10 +161,15 @@ class SubscribersRepository extends Repository {
|
||||
}
|
||||
|
||||
$subscriberSegmentsTable = $this->entityManager->getClassMetadata(SubscriberSegmentEntity::class)->getTableName();
|
||||
$segmentsTable = $this->entityManager->getClassMetadata(SegmentEntity::class)->getTableName();
|
||||
$count = $this->entityManager->getConnection()->executeUpdate("
|
||||
DELETE ss FROM $subscriberSegmentsTable ss
|
||||
JOIN $segmentsTable s ON s.id = ss.segment_id AND s.`type` = :typeDefault
|
||||
WHERE ss.`subscriber_id` IN (:ids)
|
||||
", ['ids' => $ids], ['ids' => Connection::PARAM_INT_ARRAY]);
|
||||
", [
|
||||
'ids' => $ids,
|
||||
'typeDefault' => SegmentEntity::TYPE_DEFAULT,
|
||||
], ['ids' => Connection::PARAM_INT_ARRAY]);
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user