mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fixed python ruff violaton
This commit is contained in:
1 parent
bcd5ab66a4
commit
0bdd7cedb0
2 files changed
+6
-2
No files matched your search
@@ -43,7 +43,9 @@ class RecategorizeTests(TestCase):
|
||||
flavor = Flavor.objects.create(
|
||||
name="Reinigungsbürste – Syrup Bottle", category=syrup, external_id=42
|
||||
)
|
||||
self._run([_product(42, "Reinigungsbürste – Syrup Bottle", "42 - Syrup Bottle")], apply=True)
|
||||
self._run(
|
||||
[_product(42, "Reinigungsbürste – Syrup Bottle", "42 - Syrup Bottle")], apply=True
|
||||
)
|
||||
flavor.refresh_from_db()
|
||||
self.assertEqual(flavor.category_id, self.packs.id)
|
||||
|
||||
|
||||
@@ -170,7 +170,9 @@ class AdminViewSet(viewsets.ViewSet):
|
||||
keep_flavor = Flavor.objects.get(pk=keep_id)
|
||||
remove_flavor = Flavor.objects.get(pk=remove_id)
|
||||
except Flavor.DoesNotExist:
|
||||
return Response({"error": "One or both flavors not found"}, status=status.HTTP_404_NOT_FOUND)
|
||||
return Response(
|
||||
{"error": "One or both flavors not found"}, status=status.HTTP_404_NOT_FOUND
|
||||
)
|
||||
|
||||
if keep_flavor.category_id != remove_flavor.category_id:
|
||||
return Response(
|
||||
|
||||
Reference in new issue
Block a user