fix: [hacky] readded org field to shadow attributes - just blank it out for old instances where the update failed to remove it a few years ago

pull/6378/head
iglocska 2020-09-30 09:54:00 +02:00
parent 14400a932d
commit 6d21f1696a
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 0 deletions

View File

@ -316,6 +316,10 @@ class ShadowAttribute extends AppModel
return false;
}
if (!isset($this->data['ShadowAttribute']['org'])) {
return $this->data['ShadowAttribute']['org'] = '';
}
if (empty($this->data['ShadowAttribute']['timestamp'])) {
$date = new DateTime();
$this->data['ShadowAttribute']['timestamp'] = $date->getTimestamp();