* Timesheet - Fix links to application custom fields are not created on first save

This commit is contained in:
nathangray 2018-08-13 10:48:31 -06:00
parent 584613f0bf
commit a2a33f0ae9

View File

@ -647,6 +647,8 @@ class timesheet_bo extends Api\Storage
Link::restore(TIMESHEET_APP, $new['ts_id']);
}
if (!($err = parent::save()))
{
if (!is_object($this->tracking))
{
$this->tracking = new timesheet_tracking($this);
@ -657,8 +659,6 @@ class timesheet_bo extends Api\Storage
{
return implode(', ',$this->tracking->errors);
}
if (!($err = parent::save()))
{
// notify the link-class about the update, as other apps may be subscribt to it
Link::notify_update(TIMESHEET_APP,$this->data['ts_id'],$this->data);
}