summaryrefslogtreecommitdiff
path: root/app/Model/Task.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/Task.php')
-rw-r--r--app/Model/Task.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Model/Task.php b/app/Model/Task.php
index 469927b7..f08eb910 100644
--- a/app/Model/Task.php
+++ b/app/Model/Task.php
@@ -368,11 +368,13 @@ class Task extends Base
if (! empty($values['date_due']) && ! is_numeric($values['date_due'])) {
$values['date_due'] = $this->parseDate($values['date_due']);
}
- else {
+
+ // Force integer fields at 0 (for Postgresql)
+ if (isset($values['date_due']) && empty($values['date_due'])) {
$values['date_due'] = 0;
}
- if (empty($values['score'])) {
+ if (isset($values['score']) && empty($values['score'])) {
$values['score'] = 0;
}