mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Conditional cleanup
This commit is contained in:
@@ -125,11 +125,9 @@ namespace Orchard.Localization.Controllers {
|
|||||||
// create
|
// create
|
||||||
contentItemTranslation = _contentManager.New(contentItem.ContentType);
|
contentItemTranslation = _contentManager.New(contentItem.ContentType);
|
||||||
|
|
||||||
LocalizationPart translationLp = contentItemTranslation.As<LocalizationPart>();
|
var translationLp = contentItemTranslation.As<LocalizationPart>();
|
||||||
|
|
||||||
translationLp.MasterContentItem = originalLp.MasterContentItem != null
|
translationLp.MasterContentItem = originalLp.MasterContentItem ?? contentItem;
|
||||||
? originalLp.MasterContentItem
|
|
||||||
: contentItem;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(model.SelectedCulture))
|
if (!string.IsNullOrWhiteSpace(model.SelectedCulture))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user