Skip to content

Commit 6b80dc5

Browse files
authored
Merge pull request #25067 from abpframework/fix/manage-page-post-null-reference
fix: initialize `ProfileManagementPageCreationContext` in `OnPostAsync` of `ManageModel`
2 parents d604e6c + b262f71 commit 6b80dc5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@ public virtual async Task<IActionResult> OnGetAsync()
4747
return Page();
4848
}
4949

50-
public virtual Task<IActionResult> OnPostAsync()
50+
public virtual async Task<IActionResult> OnPostAsync()
5151
{
52-
return Task.FromResult<IActionResult>(Page());
52+
ProfileManagementPageCreationContext = new ProfileManagementPageCreationContext(ServiceProvider);
53+
54+
foreach (var contributor in Options.Contributors)
55+
{
56+
await contributor.ConfigureAsync(ProfileManagementPageCreationContext);
57+
}
58+
59+
return Page();
5360
}
5461
}

0 commit comments

Comments
 (0)