diff --git a/pontos/github/api/packages.py b/pontos/github/api/packages.py index 1ee3f66f7..d320a8be5 100644 --- a/pontos/github/api/packages.py +++ b/pontos/github/api/packages.py @@ -354,8 +354,8 @@ async def delete_package_with_tag( async for package_version in self.package_versions( organization, package_type, package_name ): - if tag in self.package_version_tags(organization, package_type, package_name, package_version): - api = f"/orgs/{organization}/packages/{package_type}/{package_name}/versions/{package_version}" + if tag in await self.package_version_tags(organization, package_type, package_name, package_version.version): + api = f"/orgs/{organization}/packages/{package_type}/{package_name}/versions/{package_version.version}" response = await self._client.delete(api) if not response.is_success: raise GitHubApiError(response)