Make rockon-delete compatible with duplicate RockOn model entries #2549 #2552
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.
Fixes #2549
@phillxnet, @Hooverdan96, ready for review.
The rockon-delete currently only supports the "normal" case of a single RockOn model entry. In case one of these entries is duplicated, however, it currently fails.
This Pull Request (PR) thus adapts the current logic to get all entries (0, 1, or more) with a given name.
Demonstration
The example laid out by @Hooverdan96 in #2549 was followed: create a local Rock-On named Scrutiny.local and update the list of available Rock-Ons in the webUI. Then, manually duplicate the
RockOn
model entry. We end up with the following:We then run the updated script:
Verify it is gone:
The script still works for a Rock-On with a single entry (normal case):
Note that we also have verification by the two forum users who reported this issue that the updated script resolved their duplicate
RockOn
entries:Testing