Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_resource_created should return False where there is no relation #42

Closed
deusebio opened this issue Feb 10, 2023 · 1 comment
Closed

Comments

@deusebio
Copy link
Contributor

Bug Description

When there are no relations, is_resource_created returns True since

all([]) == True

The correct UX that I would feel more intuitive is:

  • when calling is_resource_created() with no relations, we return False
  • when calling is_resource_created(relation_id) with no relation, we raise an exception

To Reproduce

N/A

Environment

N/A

Relevant log output

N/A

Additional context

No response

@carlcsaposs-canonical
Copy link
Contributor

Fixed in #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants