summaryrefslogtreecommitdiff
path: root/app/Model/SubTask.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/SubTask.php')
-rw-r--r--app/Model/SubTask.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/app/Model/SubTask.php b/app/Model/SubTask.php
index 400c79f4..0126030a 100644
--- a/app/Model/SubTask.php
+++ b/app/Model/SubTask.php
@@ -128,17 +128,8 @@ class SubTask extends Base
*/
public function prepare(array &$values)
{
- if (isset($values['another_subtask'])) {
- unset($values['another_subtask']);
- }
-
- if (isset($values['time_estimated']) && empty($values['time_estimated'])) {
- $values['time_estimated'] = 0;
- }
-
- if (isset($values['time_spent']) && empty($values['time_spent'])) {
- $values['time_spent'] = 0;
- }
+ $this->removeFields($values, array('another_subtask'));
+ $this->resetFields($values, array('time_estimated', 'time_spent'));
}
/**