diff --git a/core/components/tickets/model/tickets/ticket.class.php b/core/components/tickets/model/tickets/ticket.class.php index b672b87..0c2b5dd 100644 --- a/core/components/tickets/model/tickets/ticket.class.php +++ b/core/components/tickets/model/tickets/ticket.class.php @@ -321,8 +321,10 @@ protected function _getVirtualFields() 'id' => $this->id, 'class' => 'Ticket', ), '', true, true); - $total->fetchValues(); - $total->save(); + if ($total->save()) { + $total->fetchValues(); + $total->save(); + } } return $total->get(array( diff --git a/core/components/tickets/model/tickets/ticketssection.class.php b/core/components/tickets/model/tickets/ticketssection.class.php index 18c7bd5..37f6e86 100644 --- a/core/components/tickets/model/tickets/ticketssection.class.php +++ b/core/components/tickets/model/tickets/ticketssection.class.php @@ -231,8 +231,10 @@ protected function _getVirtualFields() 'id' => $this->id, 'class' => 'TicketsSection', ), '', true, true); - $total->fetchValues(); - $total->save(); + if ($total->save()) { + $total->fetchValues(); + $total->save(); + } } return $total->get(array( diff --git a/core/components/tickets/model/tickets/tickettotal.class.php b/core/components/tickets/model/tickets/tickettotal.class.php index 2bec1cd..aae7d27 100644 --- a/core/components/tickets/model/tickets/tickettotal.class.php +++ b/core/components/tickets/model/tickets/tickettotal.class.php @@ -2,21 +2,6 @@ class TicketTotal extends xPDOObject { - /** - * @param null $cacheFlag - * - * @return bool - */ - public function save($cacheFlag = null) - { - if ($this->isNew()) { - $this->fromArray($this->fetchValues(), '', false, true); - } - - return parent::save($cacheFlag); - } - - /** * Get values from database */