X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/fd28890ac78d5869ac68ec6db7183bc168d03891..refs/heads/master:/src/sources/models.py?ds=sidebyside diff --git a/src/sources/models.py b/src/sources/models.py index dd521da0..ed2775ef 100644 --- a/src/sources/models.py +++ b/src/sources/models.py @@ -130,7 +130,7 @@ class BookSource(models.Model): return f'{self.source} -> {self.book}' def get_absolute_url(self): - return reverse('source_book_prepare', args=[self.pk]) + return reverse('source_book_prepare', args=[self.book.pk]) def get_view_files(self): # TODO: won't work for PDFs. @@ -162,6 +162,7 @@ class BookSource(models.Model): if dbook is None: dbook = DBook.create( user, texts[0], + catalogue_book=book, title=book.title, slug=str(uuid.uuid4()), )