- series = models.Audiobook.objects.filter(url=audiobook.url)
- real = series.count()
- if real != audiobook.parts_count:
- alerts.append(_('Parts number inconsitent. Declared number: %(declared)d. Real number: %(real)d') % {"declared": audiobook.parts_count, "real": real})
- if audiobook.parts_count > 1:
+ parts_count = audiobook.parts_count
+ if parts_count > 1:
+ series = models.Audiobook.objects.filter(slug=audiobook.slug)