Skip to content

Commit

Permalink
#29255 also set siteName to CT
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilvam committed Aug 27, 2024
1 parent d068127 commit 6052952
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,14 @@ private ContentType saveOrUpdateContentType(final ContentTypeWrapper contentType
.toJavaOptional()
.orElse(Host.SYSTEM_HOST);

final Host host = APILocator.getHostAPI().find(hostId, APILocator.systemUser(), false);

// update host so that it works locally
final ContentType typeToSave = hostId.equals(contentTypeIn.host())
? contentTypeIn
: ContentTypeBuilder.builder(contentTypeIn).from(contentTypeIn).host(hostId).build();
: ContentTypeBuilder.builder(contentTypeIn).from(contentTypeIn)
.host(host.getIdentifier())
.siteName(host.getHostname()).build();


final List<Field> deferredFields = fields.stream()
Expand Down

0 comments on commit 6052952

Please sign in to comment.