Skip to content

Commit f906d26

Browse files
committed
Use new GetContentTypeDescriptor() overload in Save()
The new `GetContentTypeDescriptor()` method (408d01a) provides a cleaner way of getting the associated `ContentTypeDescriptor` from the current topic, while simultaneously offering a fallback of retrieving missing `ContentTypeDescriptor`s from the in-memory topic graph if they can't be found in the `GetContentTypeDescriptors()` cache.
1 parent 95c27c1 commit f906d26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OnTopic/Repositories/TopicRepositoryBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public virtual int Save([ValidatedNotNull, NotNull]Topic topic, bool isRecursive
292292
| Validate content type
293293
\-----------------------------------------------------------------------------------------------------------------------*/
294294
var contentTypeDescriptors= GetContentTypeDescriptors();
295-
var contentTypeDescriptor = contentTypeDescriptors.GetTopic(topic.ContentType);
295+
var contentTypeDescriptor = GetContentTypeDescriptor(topic);
296296

297297
if (contentTypeDescriptor == null) {
298298
throw new ArgumentException(

0 commit comments

Comments
 (0)