<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<span style="color: rgb(47, 57, 65); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); display: inline !important">We've
seen that happen when a user is also an agent. Probably there's an agent (person) record linked to that user account so the account cannot be deleted. You can delete the agent record first, then the user -- that should work. Careful, sometimes you need that
agent record. In that case I'd suggest disabling the account by resetting the password to something long and random so the account cannot be used (and perhaps add "DISABLED" to "Additional Contact Information" as a note).</span>
<div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="color:rgb(0,0,0); background-color:rgb(255,255,255)">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; margin:0px">
<font face="Calibri,Arial,Helvetica,sans-serif" size="3" color="black"><span dir="ltr" style="font-size:12pt; background-color:white"><font size="2"><span style="font-size:11pt"></span></font></span></font></div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Clayton Joseph
Ruminski <crumins@clemson.edu><br>
<b>Sent:</b> Thursday, June 4, 2020 3:42 PM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> [Archivesspace_Users_Group] Error deleting agents</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Verdana}
@font-face
{font-family:Consolas}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
{color:#0563C1;
text-decoration:underline}
a:visited, span.x_MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New"}
span.x_EmailStyle17
{font-family:"Calibri",sans-serif;
color:windowtext}
span.x_HTMLPreformattedChar
{font-family:"Courier New"}
.x_MsoChpDefault
{font-family:"Calibri",sans-serif}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal">Hello,</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">We are doing some data cleanup in ASpace, and one agent in particular is giving me the following error when trying to delete it:</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal" style="word-break:break-all"><span style="font-size:10.0pt; font-family:Consolas; color:#333333">Record deletion failed: Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row:
a foreign key constraint fails (`archivesspace`.`user`, CONSTRAINT `user_ibfk_1` FOREIGN KEY (`agent_record_id`) REFERENCES `agent_person` (`id`))</span></p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">I looked on the user group archives but was unable to find an answer. The agent looks to have been autogenerated at some point and is not linked to any records.
</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Thanks!</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"><b><span style="font-family:"Verdana",sans-serif; color:#685C53">Clayton Ruminski</span></b><span style="font-family:"Verdana",sans-serif; color:#685C53"> </span><span style="font-family:"Verdana",sans-serif; color:#F66733">CLEMSON UNIVERSITY</span><span style="color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Verdana",sans-serif; color:#685C53"> </span><span style="color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Verdana",sans-serif; color:#685C53">Digital and Preservation Archivist</span><span style="color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Verdana",sans-serif; color:#685C53">Special Collections and Archives</span><span style="color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Verdana",sans-serif; color:#685C53">Clemson University Libraries</span><span style="color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Verdana",sans-serif; color:black"><a href="mailto:crumins@clemson.edu"><span style="color:#0563C1">crumins@clemson.edu</span></a></span><span style="color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Verdana",sans-serif; color:#685C53">864-656-0234</span><span style="color:black"></span></p>
<p class="x_MsoNormal"> </p>
</div>
</div>
</body>
</html>