Skip to content
Snippets Groups Projects
Commit 8ded46bb authored by Sarthak Shrivastava's avatar Sarthak Shrivastava
Browse files

Fixed small bug with transfer ownership not working correctly.

parent baf14d8b
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,15 @@ public class MyOrgRosterRepository implements OrgRosterRepository{
nativeQuery.setParameter("memberEmail", memberEmail);
int updatedRows = nativeQuery.executeUpdate();
if (type == OrganizationRoster.Type.OWNER)
{
String secondquery = "UPDATE ORGANIZATION SET owner_email = :memberEmail " +
"WHERE organization_id = :orgId ";
Query secondnativeQuery = entityManager.createNativeQuery(secondquery);
secondnativeQuery.setParameter("orgId", orgId);
secondnativeQuery.setParameter("memberEmail", memberEmail);
secondnativeQuery.executeUpdate();
}
result.put("result", "success");
result.put("updatedRows", updatedRows);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment