Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix wrong checking of Vatlayer's API keys

Maciej Korycinskibd8eed9f868c
diff --git a/saleor/extensions/plugins/vatlayer/plugin.py b/saleor/extensions/plugins/vatlayer/plugin.py
index 543acb5601..2be7e4784d 100644
--- a/saleor/extensions/plugins/vatlayer/plugin.py
+++ b/saleor/extensions/plugins/vatlayer/plugin.py
@@ -43,10 +43,7 @@ class VatlayerPlugin(BasePlugin):
self.active = bool(settings.VATLAYER_ACCESS_KEY)
def _skip_plugin(self, previous_value: Union[TaxedMoney, TaxedMoneyRange]) -> bool:
- if not self.active:
- return True
-
- if not settings.VATLAYER_ACCESS_KEY:
+ if not self.active or not settings.VATLAYER_ACCESS_KEY:
return True
# The previous plugin already calculated taxes so we can skip our logic