--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041951
This commit is contained in:
ErikPorter
2009-11-23 21:22:29 +00:00
parent b12767c8ce
commit 4dca80d2e9

View File

@@ -16,7 +16,8 @@ namespace Orchard.Blogs.Services {
public Blog Get(string slug) { public Blog Get(string slug) {
BlogRecord record = _repository.Get(br => br.Slug == slug && br.Enabled); BlogRecord record = _repository.Get(br => br.Slug == slug && br.Enabled);
return _contentManager.Get<Blog>(record.Id);
return record != null ?_contentManager.Get<Blog>(record.Id) : null;
} }
public IEnumerable<Blog> Get() { public IEnumerable<Blog> Get() {