Fix linting

This commit is contained in:
Joachim 2021-05-27 21:40:23 +02:00
parent b7965ce2ae
commit d9d34d8220
4 changed files with 5 additions and 5 deletions

View file

@ -93,7 +93,7 @@ class Book(BookDataModel):
published_date = fields.DateTimeField(blank=True, null=True)
objects = InheritanceManager()
field_tracker = FieldTracker(fields=['authors', 'title', 'subtitle', 'cover'])
field_tracker = FieldTracker(fields=["authors", "title", "subtitle", "cover"])
@property
def author_text(self):

View file

@ -49,7 +49,7 @@ class SiteSettings(models.Model):
admin_email = models.EmailField(max_length=255, null=True, blank=True)
footer_item = models.TextField(null=True, blank=True)
field_tracker = FieldTracker(fields=['name', 'instance_tagline', 'logo'])
field_tracker = FieldTracker(fields=["name", "instance_tagline", "logo"])
@classmethod
def get(cls):

View file

@ -307,7 +307,7 @@ class Review(Status):
max_digits=3,
)
field_tracker = FieldTracker(fields=['rating'])
field_tracker = FieldTracker(fields=["rating"])
@property
def pure_name(self):
@ -410,7 +410,7 @@ class Boost(ActivityMixin, Status):
def preview_image(instance, sender, *args, **kwargs):
if sender in (Review, ReviewRating):
changed_fields = instance.field_tracker.changed()
if len(changed_fields) > 0:
edition = instance.book
generate_edition_preview_image_task.delay(edition.id)

View file

@ -123,7 +123,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
name_field = "username"
property_fields = [("following_link", "following")]
field_tracker = FieldTracker(fields=['name', 'avatar'])
field_tracker = FieldTracker(fields=["name", "avatar"])
@property
def following_link(self):