FIX:(#1631) When adding/refreshing an arc that had series that had an identical comicid within another comicid, it would error out due to invalid data being returned

This commit is contained in:
evilhero 2017-05-09 09:38:23 -04:00
parent 2bba83a6d3
commit ac2281e801
3 changed files with 21 additions and 10 deletions

View File

@ -1030,7 +1030,7 @@ div#artistheader h2 a {
text-align: center; text-align: center;
} }
#arc_detail th#issuedate { #arc_detail th#issuedate {
max-width: 40px; max-width: 45px;
text-align: center; text-align: center;
} }
#arc_detail th#readingorder { #arc_detail th#readingorder {
@ -1055,7 +1055,7 @@ div#artistheader h2 a {
vertical-align: middle; vertical-align: middle;
} }
#arc_detail td#issuedate { #arc_detail td#issuedate {
max-width: 40px; max-width: 45px;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
} }

View File

@ -166,6 +166,7 @@
%endfor %endfor
</tbody> </tbody>
</table> </table>
</br>
<div style="position:relative; width:960px; height:10px; margin:10px auto;"> <div style="position:relative; width:960px; height:10px; margin:10px auto;">
<form action="manual_arc_add" method="GET"> <form action="manual_arc_add" method="GET">
<input type="hidden" name="storyarcid" value=${storyarcid}> <input type="hidden" name="storyarcid" value=${storyarcid}>

View File

@ -459,11 +459,24 @@ class WebInterface(object):
issname = arcval['Issue_Name'] issname = arcval['Issue_Name']
issid = str(arcval['IssueID']) issid = str(arcval['IssueID'])
comicid = str(arcval['ComicID']) comicid = str(arcval['ComicID'])
if comicid not in cidlist: #--- this needs to get changed so comicid within a comicid doesn't exist (ie. 3092 is IN 33092)
if n == 0: cid_count = cidlist.count(comicid) +1
cidlist += str(comicid) a_end = 0
else: i = 0
cidlist += '|' + str(comicid) while i < cid_count:
a = cidlist.find(comicid, a_end)
a_end = cidlist.find('|',a)
if a_end == -1: a_end = len(cidlist)
a_length = cidlist[a:a_end-1]
if a == -1 and len(a_length) != len(comicid):
if n == 0:
cidlist += str(comicid)
else:
cidlist += '|' + str(comicid)
break
i+=1
#don't recreate the st_issueid if it's a refresh and the issueid already exists (will create duplicates otherwise) #don't recreate the st_issueid if it's a refresh and the issueid already exists (will create duplicates otherwise)
st_issueid = None st_issueid = None
manual_mod = None manual_mod = None
@ -511,7 +524,6 @@ class WebInterface(object):
"Int_IssueNumber": int_issnum, "Int_IssueNumber": int_issnum,
"Manual": manual_mod}) "Manual": manual_mod})
n+=1 n+=1
comicid_results = mylar.cv.getComic(comicid=None, type='comicyears', comicidlist=cidlist) comicid_results = mylar.cv.getComic(comicid=None, type='comicyears', comicidlist=cidlist)
logger.fdebug(module + ' Initiating issue updating - just the info') logger.fdebug(module + ' Initiating issue updating - just the info')
@ -558,8 +570,6 @@ class WebInterface(object):
myDB.upsert("readinglist", newVals, newCtrl) myDB.upsert("readinglist", newVals, newCtrl)
#logger.info(newVals)
#run the Search for Watchlist matches now. #run the Search for Watchlist matches now.
logger.fdebug(module + ' Now searching your watchlist for matches belonging to this story arc.') logger.fdebug(module + ' Now searching your watchlist for matches belonging to this story arc.')
self.ArcWatchlist(storyarcid) self.ArcWatchlist(storyarcid)