summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-07-07 15:16:33 -0300
committerFrédéric Guillot <fred@kanboard.net>2014-07-07 15:16:33 -0300
commit9f93407b5e7d2bb0827fb638e68d0d6a8b7ae6ca (patch)
tree59d5989d1916879e5ec4db6a319f82cc4c3025e2 /app/Model
parent0e118da124e6e6954f58b19e9aeb502d1adc048a (diff)
Fix bug: due date and score lost on update
Diffstat (limited to 'app/Model')
-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;
}