wzq před 5 roky
rodič
revize
2b0048f31d
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  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;
                         }