Refactoring the Document class for publishing and unpublishing.
Bumped into an issue with nullable datetime and petapoco, which now has a workaround in our IMapper. Fix a few issues around the Published state on previous versions.
This commit is contained in:
@@ -87,10 +87,10 @@ namespace Umbraco.Core.Models
|
||||
if(Trashed)
|
||||
return ContentStatus.Trashed;
|
||||
|
||||
if(ExpireDate.HasValue && DateTime.UtcNow > ExpireDate.Value)
|
||||
if(ExpireDate.HasValue && ExpireDate.Value > DateTime.MinValue && DateTime.UtcNow > ExpireDate.Value)
|
||||
return ContentStatus.Expired;
|
||||
|
||||
if(ReleaseDate.HasValue && ReleaseDate.Value > DateTime.UtcNow)
|
||||
if(ReleaseDate.HasValue && ReleaseDate.Value > DateTime.MinValue && ReleaseDate.Value > DateTime.UtcNow)
|
||||
return ContentStatus.AwaitingRelease;
|
||||
|
||||
if(Published)
|
||||
|
||||
Reference in New Issue
Block a user