|
|
@@ -245,6 +245,12 @@ public class Asset extends CollectionBaseEntity {
|
|
|
private boolean metaPutOn;
|
|
|
|
|
|
public static Asset create(Collection collection, User user) {
|
|
|
+ Set<Tag> tags;
|
|
|
+ if (collection.getTags() != null) {
|
|
|
+ tags = new HashSet<>(collection.getTags());
|
|
|
+ } else {
|
|
|
+ tags = new HashSet<>();
|
|
|
+ }
|
|
|
return Asset.builder()
|
|
|
.userId(user.getId())
|
|
|
.collectionId(collection.getId())
|
|
|
@@ -270,7 +276,7 @@ public class Asset extends CollectionBaseEntity {
|
|
|
.holdDays(collection.getHoldDays())
|
|
|
.oldHoldDays(collection.getHoldDays())
|
|
|
.source(AssetSource.OFFICIAL)
|
|
|
- .tags(new HashSet<>(collection.getTags()))
|
|
|
+ .tags(tags)
|
|
|
.prefixName(collection.getPrefixName())
|
|
|
.empower(collection.getEmpower())
|
|
|
.companyId(collection.getCompanyId())
|