diff --git a/tasks.py b/tasks.py index 6b75b3a91..8d4d2ca0d 100644 --- a/tasks.py +++ b/tasks.py @@ -45,7 +45,10 @@ def is_truthy(arg): with open("pyproject.toml", "r", encoding="utf8") as pyproject: parsed_toml = toml.load(pyproject) -NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"] +try: + NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"]["version"] +except TypeError: + NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"] def task(function=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg