wangqifan 3 ani în urmă
părinte
comite
024fdff7d7
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      src/main/java/com/izouma/nineth/domain/Asset.java

+ 5 - 1
src/main/java/com/izouma/nineth/domain/Asset.java

@@ -247,7 +247,11 @@ public class Asset extends CollectionBaseEntity {
     public static Asset create(Collection collection, User user) {
     public static Asset create(Collection collection, User user) {
         Set<Tag> tags;
         Set<Tag> tags;
         if (collection.getTags() != null) {
         if (collection.getTags() != null) {
-            tags = new HashSet<>(collection.getTags());
+            if (collection.getTags().size() > 0) {
+                tags = new HashSet<>(collection.getTags());
+            } else {
+                tags = new HashSet<>();
+            }
         } else {
         } else {
             tags = new HashSet<>();
             tags = new HashSet<>();
         }
         }