Skip to content

Commit

Permalink
Do not try to export content for published schemas with sync out.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed May 9, 2023
1 parent 048495d commit ea1d607
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cli/Squidex.CLI/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<PackageTags>Squidex HeadlessCMS</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>10.1</Version>
<Version>10.2</Version>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ public async Task ExportAsync(ISyncService sync, SyncOptions options, ISession s

foreach (var schema in schemas.Items)
{
if (!schema.IsPublished)
{
log.ProcessSkipped($"Exporting {schema.Name}.", "Not published.");
continue;
}

var client = session.Client.DynamicContents(schema.Name);

var contents = new List<ContentModel>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15806,15 +15806,15 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
urlBuilder_.Replace("{app}", _options.AppName);
if (parentId != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("ParentId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(parentId, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("parentId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(parentId, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (id != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("Id") + "=").Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("id") + "=").Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (duplicate != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("Duplicate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(duplicate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("duplicate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(duplicate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;

Expand All @@ -15835,7 +15835,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var content_file_ = new System.Net.Http.StreamContent(file.Data);
if (!string.IsNullOrEmpty(file.ContentType))
content_file_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(file.ContentType);
content_.Add(content_file_, "File", file.FileName ?? "File");
content_.Add(content_file_, "file", file.FileName ?? "file");
}
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
Expand Down Expand Up @@ -16142,11 +16142,11 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture)));
if (parentId != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("ParentId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(parentId, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("parentId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(parentId, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (duplicate != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("Duplicate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(duplicate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("duplicate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(duplicate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;

Expand All @@ -16167,7 +16167,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var content_file_ = new System.Net.Http.StreamContent(file.Data);
if (!string.IsNullOrEmpty(file.ContentType))
content_file_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(file.ContentType);
content_.Add(content_file_, "File", file.FileName ?? "File");
content_.Add(content_file_, "file", file.FileName ?? "file");
}
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
Expand Down Expand Up @@ -16384,11 +16384,11 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture)));
if (checkReferrers != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("CheckReferrers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(checkReferrers, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("checkReferrers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(checkReferrers, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (permanent != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("Permanent") + "=").Append(System.Uri.EscapeDataString(ConvertToString(permanent, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
urlBuilder_.Append(System.Uri.EscapeDataString("permanent") + "=").Append(System.Uri.EscapeDataString(ConvertToString(permanent, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;

Expand Down Expand Up @@ -20993,6 +20993,12 @@ public partial class AssetsFieldPropertiesDto : FieldPropertiesDto
[Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FolderId { get; set; }

/// <summary>
/// The preview format.
/// </summary>
[Newtonsoft.Json.JsonProperty("previewFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string PreviewFormat { get; set; }

/// <summary>
/// The minimum allowed items for the field value.
/// </summary>
Expand Down

0 comments on commit ea1d607

Please sign in to comment.