File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,6 @@ func populateSubmission(submissionURL string, listPath *paths.Path) (submissionT
246
246
247
247
// Check if the URL is already in the index.
248
248
listLines , err := listPath .ReadFileAsLines ()
249
- occurrences := 0
250
249
for _ , listURL := range listLines {
251
250
listURLObject , err := url .Parse (strings .TrimSpace (listURL ))
252
251
if err != nil {
@@ -255,11 +254,8 @@ func populateSubmission(submissionURL string, listPath *paths.Path) (submissionT
255
254
256
255
normalizedListURLObject := normalizeURL (listURLObject )
257
256
if normalizedListURLObject .String () == normalizedURLObject .String () {
258
- occurrences ++
259
- if occurrences > 1 {
260
- submission .Error = "Submission URL is already in the Library Manager index."
261
- return submission , ""
262
- }
257
+ submission .Error = "Submission URL is already in the Library Manager index."
258
+ return submission , ""
263
259
}
264
260
}
265
261
You can’t perform that action at this time.
0 commit comments