Skip to content

Commit d5abf7b

Browse files
committed
Don't update user-id during editing
1 parent 83d64df commit d5abf7b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/DntSite.Web/Features/Posts/ModelsMappings/PostsMappersExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ public static BlogPostDraft MapWriteDraftModelToBlogPostDraft(this WriteDraftMod
234234
destination.IsConverted = draft.IsConverted;
235235
destination.ReadingTimeMinutes = draft.ReadingTimeMinutes;
236236
destination.DateTimeToShow = draft.DateTimeToShow;
237-
destination.UserId = draft.UserId;
237+
238+
destination.UserId ??= draft.UserId;
239+
238240
destination.IsReady = draft.IsReady;
239241
destination.Tags = draft.Tags;
240242
destination.NumberOfRequiredPoints = draft.NumberOfRequiredPoints;

0 commit comments

Comments
 (0)