Skip to content

Commit

Permalink
Delete Project: project short_name field to null
Browse files Browse the repository at this point in the history
  • Loading branch information
danjasuw committed Apr 17, 2021
1 parent a9bc277 commit e27b9d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,15 @@ public void updateAbstract( int id, String abstractText ) throws Exception {
}

/**
* Update enabled = 0, marked_for_deletion = 1
* Update enabled = 0, marked_for_deletion = 1, short_name = null
* @param id
* @throws Exception
*/
public void updateSetEnabledZeroAndMarkToDeleteOne( int id, int authUserId ) throws Exception {
public void updateSet_EnabledZero_MarkToDeleteOne_ShortNameToNull( int id, int authUserId ) throws Exception {
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
final String sql = "UPDATE project SET enabled = 0, marked_for_deletion = 1, marked_for_deletion_auth_user_id = ?, marked_for_deletion_timestamp = NOW() WHERE id = ?";
final String sql = "UPDATE project SET enabled = 0, marked_for_deletion = 1, short_name = null, marked_for_deletion_auth_user_id = ?, marked_for_deletion_timestamp = NOW() WHERE id = ?";
try {
conn = DBConnectionFactory.getConnection( DBConnectionFactory.PROXL );
pstmt = conn.prepareStatement( sql );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public GenericWebserviceResult markForDeletion(
);
}
int authUserId = userSession.getAuthUserId();
projectDAO.updateSetEnabledZeroAndMarkToDeleteOne( projectId, authUserId );
projectDAO.updateSet_EnabledZero_MarkToDeleteOne_ShortNameToNull( projectId, authUserId );
Cached_ProjectTblSubPartsForProjectLists.getInstance().invalidateProjectId( projectId );
genericWebserviceResult.setStatus(true);
return genericWebserviceResult;
Expand Down

0 comments on commit e27b9d5

Please sign in to comment.