Fix "DB delete failed" (#5534)

This commit is contained in:
Marc Bernard 2022-05-05 17:11:26 +02:00 committed by GitHub
parent 1b4582bc03
commit 73c9763a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,18 +115,10 @@ CLASS zcl_abapgit_persistence_db IMPLEMENTATION.
lock( iv_type = iv_type
iv_value = iv_value ).
" Ignore errors since record might not exist
DELETE FROM (c_tabname)
WHERE type = iv_type
AND value = iv_value.
IF sy-subrc <> 0.
" If entry is still there? That's an error, otherwise ignore
SELECT SINGLE data_str FROM (c_tabname) INTO lv_data
WHERE type = iv_type
AND value = iv_value.
IF sy-subrc = 0.
zcx_abapgit_exception=>raise( 'DB Delete failed' ).
ENDIF.
ENDIF.
ENDMETHOD.