File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 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
246246
247247 // Check if the URL is already in the index.
248248 listLines , err := listPath .ReadFileAsLines ()
249- occurrences := 0
250249 for _ , listURL := range listLines {
251250 listURLObject , err := url .Parse (strings .TrimSpace (listURL ))
252251 if err != nil {
@@ -255,11 +254,8 @@ func populateSubmission(submissionURL string, listPath *paths.Path) (submissionT
255254
256255 normalizedListURLObject := normalizeURL (listURLObject )
257256 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 , ""
263259 }
264260 }
265261
You can’t perform that action at this time.
0 commit comments