Fix so non-anthology numeric custom columns populate correctly.

This commit is contained in:
Jim Miller 2013-05-30 19:37:50 -05:00
parent c9a1537190
commit 5ce064bf92

View file

@ -1395,7 +1395,7 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
if flag == 'r' or book['added']: # flag 'n' isn't actually needed--*always* set if configured and new book.
if coldef['datatype'] in ('int','float'): # for favs, etc--site specific metadata.
if meta in book['anthology_meta_list']:
if 'anthology_meta_list' in book and meta in book['anthology_meta_list']:
# re-split list, strip commas, convert to floats, sum up.
val = sum([ float(x.replace(",","")) for x in book['all_metadata'][meta].split(", ") ])
else: