From 853189a43fff8b8b64f18029a35ac910b14932e8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 2 Jul 2016 11:50:32 -0400 Subject: Do not create empty tags and remove tags only when necessary --- app/Model/TaskTagModel.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app/Model/TaskTagModel.php') 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); -- cgit v1.2.3