We recently created an API Key and then afterwards deleted it.

After that, we are no longer able to create new API keys, whenever we try, after keying in the api key details and try to save, it will throw this error.

Error

Object reference not set to an instance of an object.

   at Rock.Model.Person.PreSaveChanges(DbContext dbContext, DbEntityEntry entry)

   at Rock.Data.Model`1.PreSaveChanges(DbContext dbContext, DbEntityEntry entry, EntityState state)

   at Rock.Data.DbContext.RockPreSave(DbContext dbContext, PersonAlias personAlias, Boolean enableAuditing)

   at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing)

   at Rock.Data.DbContext.SaveChanges()

   at RockWeb.Blocks.Security.RestKeyDetail.<>c__DisplayClass1.<lbSave_Click>b__0() in d:\home\site\wwwroot\Blocks\Security\RestKeyDetail.ascx.cs:line 88

   at Rock.Data.DbContext.WrapTransaction(Action action)

   at RockWeb.Blocks.Security.RestKeyDetail.lbSave_Click(Object sender, EventArgs e) in d:\home\site\wwwroot\Blocks\Security\RestKeyDetail.ascx.cs:line 77

   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)

   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Any ideas on how this can be resolved?


Thanks