fix: [sync] Proposal pull restricted to 14 days

- no need to pull ancient proposals each time
pull/4877/head
iglocska 2019-07-10 15:10:23 +02:00
parent 64fafa1913
commit be6da3481f
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 1 deletions

View File

@ -1024,7 +1024,10 @@ class ShadowAttributesController extends AppController
if (!empty($this->request->data)) {
foreach ($this->request->data as $eventUuid) {
$temp = $this->ShadowAttribute->find('all', array(
'conditions' => array('event_uuid' => $eventUuid),
'conditions' => array(
'event_uuid' => $eventUuid,
'timestamp >' => strtotime("-14 day")
),
'recursive' => -1,
'contain' => array(
'Org' => array('fields' => array('uuid', 'name')),