diff options
Diffstat (limited to 'app/books/kindleparser.py')
-rw-r--r-- | app/books/kindleparser.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/books/kindleparser.py b/app/books/kindleparser.py index b2f0191..6b708d9 100644 --- a/app/books/kindleparser.py +++ b/app/books/kindleparser.py @@ -6,7 +6,7 @@ This script then parses that json and tries to load it into the django database import json import datetime from django.core.exceptions import ObjectDoesNotExist -from books.models import Book, BookHighlights +from books.models import Book, BookHighlight def parse_kindle_clippings(path): json_data = open(path) @@ -43,11 +43,11 @@ def parse_kindle_clippings(path): ) try: #see if we already this highlight - row = BookHighlights.objects.get(book__title=clip['title'], date_added=clip_date ) + row = BookHighlight.objects.get(book__title=clip['title'], date_added=clip_date ) #if we don't create a new book highlight except ObjectDoesNotExist: book = Book.objects.get(title=clip['title']) - bh, created = BookHighlights.objects.get_or_create( + bh, created = BookHighlight.objects.get_or_create( book = book, page = page, location = location, |