Browse Source

Merge pull request #25067 from abpframework/fix/manage-page-post-null-reference

fix: initialize `ProfileManagementPageCreationContext` in `OnPostAsync` of `ManageModel`
pull/25083/head
Yağmur Çelik 6 months ago
committed by GitHub
parent
commit
6b80dc5971
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 11
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs

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

@ -47,8 +47,15 @@ public class ManageModel : AccountPageModel
return Page();
}
public virtual Task<IActionResult> OnPostAsync()
public virtual async Task<IActionResult> OnPostAsync()
{
return Task.FromResult<IActionResult>(Page());
ProfileManagementPageCreationContext = new ProfileManagementPageCreationContext(ServiceProvider);
foreach (var contributor in Options.Contributors)
{
await contributor.ConfigureAsync(ProfileManagementPageCreationContext);
}
return Page();
}
}

Loading…
Cancel
Save