temporary workaround for duplicate claim id

This commit is contained in:
Akinwale Ariwodola 2017-06-17 18:47:16 +01:00
parent fa555e77be
commit 8e7b1f42bd

View file

@ -160,7 +160,7 @@ class MainController extends AppController {
$this->set('currentPage', $page);
$this->set('claims', $claims);
} else {
$claim = $this->Claims->find()->contain(['Stream', 'Publisher' => ['fields' => ['ClaimId', 'Name']]])->where(['Claims.ClaimId' => $id])->first();
$claim = $this->Claims->find()->contain(['Stream', 'Publisher' => ['fields' => ['ClaimId', 'Name']]])->where(['Claims.ClaimId' => $id])->order(['Claims.Created' => 'DESC'])->first();
if (!$claim) {
return $this->redirect('/');
}