Skip to content

Commit 94f1efc

Browse files
committed
Integrate new Topic.IsNew property
This is just a shorthand for `Topic.Id < 0`, but it is more semantically meaningful and intuitive to read.
1 parent 68fa02b commit 94f1efc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OnTopic.Data.Transfer/Interchange/TopicExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ bool useCustomMergeRules(AttributeData attribute) =>
451451
private static string? GetTopicId(Topic topic, string? uniqueKey) {
452452
if (uniqueKey!.StartsWith("Root", StringComparison.InvariantCultureIgnoreCase)) {
453453
var target = topic.GetByUniqueKey(uniqueKey);
454-
if (target != null && target.Id >= 0) {
454+
if (target != null && !target.IsNew) {
455455
return target.Id.ToString(CultureInfo.CurrentCulture);
456456
}
457457
else {

0 commit comments

Comments
 (0)