New fixes

This commit is contained in:
Antoine Nguyen
2025-02-18 16:15:44 +01:00
parent db0b7eb79d
commit 4458e82c25
92 changed files with 298 additions and 309 deletions
@@ -44,7 +44,7 @@ class Command(BaseCommand):
).first()
if not addressbook:
raise CommandError(
"Address Book for email '%s' not found" % options["email"]
"Address Book for email '{}' not found".format(options["email"])
)
try:
import_csv_file(
@@ -55,5 +55,5 @@ class Command(BaseCommand):
options.get("carddav_password"),
)
except RuntimeError as err:
raise CommandError(err)
raise CommandError(err) from None
self.stdout.write(self.style.SUCCESS("File was imported successfuly"))
+1 -1
View File
@@ -24,7 +24,7 @@ class TestDataMixin:
@classmethod
def setUpTestData(cls):
"""Create test data."""
super(TestDataMixin, cls).setUpTestData()
super().setUpTestData()
admin_factories.populate_database()
cls.user = core_models.User.objects.get(username="user@test.com")
cls.addressbook = cls.user.addressbook_set.first()