Fix dual notification when deleting bitstreamformats#1886
Merged
tdonohue merged 1 commit intoDSpace:mainfrom Oct 6, 2022
Merged
Fix dual notification when deleting bitstreamformats#1886tdonohue merged 1 commit intoDSpace:mainfrom
tdonohue merged 1 commit intoDSpace:mainfrom
Conversation
… and a success notification
|
This pull request introduces 2 alerts when merging f5deb88 into 8ffc325 - view on LGTM.com new alerts:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
The issue here was older, likely introduced by #975: the
BitstreamFormatDataServicehad been refactored to work using RemoteData objects, but the delete method in the component wasn't updated afterwards. As a consequence the error notification is shown when the dataService emits the first time, to indicate that the response is pending. When it emits again afterwards, once the response comes in, the success notification is shown.The solution was to add a
getFirstCompletedRemoteData()operatorI also refactored the delete method to get rid of the nested subscribes
Instructions for Reviewers
Delete bitstreamformats separately and in bulk, and verify that they are removed correctly, and that only the correct notifications are shown.
Checklist
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.