fix: don't flag stream ID removal as invalid in report:create

The edit form tells users to put `~` in a field to delete its value.
report:create split the Stream ID on `@` without checking for that, so
an edit request that removes the stream ID from an existing link was
listed as invalid_channel_id, since there is no channel called `~`.

Skip the channel lookup when the stream ID is marked as deleted, as
issue:validate already does.
This commit is contained in:
leoca committed 2026-10-21 19:10:57 +00:00
1 parent b598dec059
commit f3cb3c0fee
2 files changed
+18 -1

No files matched your search

+5 -1
View File
@@ -130,7 +130,11 @@ async function main() {
if (!streamUrl) result.status = status.MISSING_STREAM_URL
else if (streamsGroupedByUrl.missing(streamUrl)) result.status = status.NONEXISTENT_LINK
else if (channelId && data.channelsKeyById.missing(channelId))
else if (
channelId &&
!issue.dataSet.isDeleted('stream_id') &&
data.channelsKeyById.missing(channelId)
)
result.status = status.INVALID_CHANNEL_ID
report.add(result)