Browse Source

[profiles] Just black

Colin Powell 2 days ago
parent
commit
5427198185
1 changed files with 6 additions and 2 deletions
  1. 6 2
      vrobbler/apps/profiles/models.py

+ 6 - 2
vrobbler/apps/profiles/models.py

@@ -16,6 +16,7 @@ BNULL = {"blank": True, "null": True}
 
 logger = logging.getLogger(__name__)
 
+
 class UserProfile(TimeStampedModel):
     user = models.OneToOneField(
         User, on_delete=models.CASCADE, related_name="profile"
@@ -72,7 +73,10 @@ class UserProfile(TimeStampedModel):
             old_instance = UserProfile.objects.get(pk=self.pk)
             is_timezone_change = self.timezone != old_instance.timezone
             if is_timezone_change:
-                logger.info("Updating timezone changelog for user", extra={"profile_id": self.id})
+                logger.info(
+                    "Updating timezone changelog for user",
+                    extra={"profile_id": self.id},
+                )
                 previous_changes = old_instance.timezone_change_log
                 now = timezone.now().replace(microsecond=0)
                 new_log = f"{self.timezone} - {now}"
@@ -98,7 +102,7 @@ class UserProfile(TimeStampedModel):
             change_list = self.historic_timezone_changes
             for idx, start in enumerate(change_list):
                 try:
-                    end = change_list[idx+1]
+                    end = change_list[idx + 1]
                 except IndexError:
                     end = None