chore(advisor): simplify report cleanup delete queries

Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/6496395d-5cbf-42ba-a3e0-d3c9e6ca901c

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-08 06:55:28 +00:00
committed by GitHub
co-authored by abnegate
parent 56b9de097f
commit f63ded6159
@@ -232,12 +232,10 @@ class Deletes extends Action
$this->deleteByGroup('insights', [
Query::equal('projectInternalId', [$projectInternalId]),
Query::equal('reportInternalId', [$reportInternalId]),
Query::orderAsc(),
], $dbForPlatform, function (Document $insight) use ($dbForPlatform, $projectInternalId) {
$this->deleteByGroup('insightCTAs', [
Query::equal('projectInternalId', [$projectInternalId]),
Query::equal('insightInternalId', [$insight->getSequence()]),
Query::orderAsc(),
], $dbForPlatform);
});
}