summaryrefslogtreecommitdiff
path: root/app/Model/TaskTagModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-02 11:50:32 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-02 11:50:32 -0400
commit853189a43fff8b8b64f18029a35ac910b14932e8 (patch)
tree53a4b6fd29124de69ce20ea9ec2d0fb7caa1d297 /app/Model/TaskTagModel.php
parent6db72521eab77ebcb5f8bb196fe72e8f4f8a8c34 (diff)
Do not create empty tags and remove tags only when necessary
Diffstat (limited to 'app/Model/TaskTagModel.php')
-rw-r--r--app/Model/TaskTagModel.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/Model/TaskTagModel.php b/app/Model/TaskTagModel.php
index 91dfd224..2a08e867 100644
--- a/app/Model/TaskTagModel.php
+++ b/app/Model/TaskTagModel.php
@@ -82,6 +82,7 @@ class TaskTagModel extends Base
public function save($project_id, $task_id, array $tags)
{
$task_tags = $this->getList($task_id);
+ $tags = array_filter($tags);
return $this->associateTags($project_id, $task_id, $task_tags, $tags) &&
$this->dissociateTags($task_id, $task_tags, $tags);