wzq 5 anni fa
parent
commit
2b0048f31d
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      app/Repositories/Post/PostRepository.php

+ 4 - 1
app/Repositories/Post/PostRepository.php

@@ -1442,7 +1442,10 @@ class PostRepository
                     DB::beginTransaction();
                     try {
                         $topicIds = explode(',', $post->topic_ids);
-                        if(in_array($toTopicId, $topicIds)) continue;
+                        if(in_array($toTopicId, $topicIds)){
+                            DB::rollBack();
+                            continue;
+                        }
                         foreach($topicIds as &$val){
                             if($val == $topicId) $val = $toTopicId;
                         }