X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..6034428b14b634d1801e2d8279b1a0863b918a48:/src/catalogue/models/source.py diff --git a/src/catalogue/models/source.py b/src/catalogue/models/source.py index 9aff4efec..f36850ddd 100644 --- a/src/catalogue/models/source.py +++ b/src/catalogue/models/source.py @@ -17,7 +17,7 @@ class Source(models.Model): verbose_name_plural = _('sources') app_label = 'catalogue' - def __unicode__(self): + def __str__(self): return self.netloc def save(self, *args, **kwargs): @@ -39,7 +39,6 @@ class Source(models.Model): if old_name != self.name or old_netloc != self.netloc: for book in Book.objects.all(): source = book.extra_info.get('source_url', '') - if self.netloc in source or (old_netloc != self.netloc - and old_netloc in source): + if self.netloc in source or (old_netloc != self.netloc and old_netloc in source): book.flush_includes() return ret