Fixes being able to edit invariant content

This commit is contained in:
Shannon
2018-05-08 01:16:32 +10:00
parent b1eeb5b193
commit 8a5ca2c4b4
2 changed files with 91 additions and 61 deletions

View File

@@ -25,6 +25,9 @@ namespace Umbraco.Web.Models.Mapping
public IEnumerable<ContentVariation> Resolve(IContent source, ContentItemDisplay destination, IEnumerable<ContentVariation> destMember, ResolutionContext context)
{
if (!source.ContentType.Variations.Has(Core.Models.ContentVariation.CultureNeutral))
return Enumerable.Empty<ContentVariation>();
var allLanguages = _localizationService.GetAllLanguages().OrderBy(x => x.Id).ToList();
if (allLanguages.Count == 0) return Enumerable.Empty<ContentVariation>();