Change server to use a getter for isbn instead of data[FIELD_MAP]

This commit is contained in:
Charles Haley 2011-02-28 16:48:10 +00:00
parent 5d317eb534
commit be4984f492

View File

@ -89,13 +89,16 @@ class XMLServer(object):
for x in ('id', 'title', 'sort', 'author_sort', 'rating', 'size'):
kwargs[x] = serialize(record[FM[x]])
for x in ('isbn', 'formats', 'series', 'tags', 'publisher',
for x in ('formats', 'series', 'tags', 'publisher',
'comments'):
y = record[FM[x]]
if x == 'tags':
y = format_tag_string(y, ',', ignore_max=True)
kwargs[x] = serialize(y) if y else ''
isbn = self.db.isbn(record[FM['id']], index_is_id=True)
kwargs['isbn'] = serialize(isbn if isbn else '')
kwargs['safe_title'] = ascii_filename(kwargs['title'])
c = kwargs.pop('comments')