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

Find returns false #25

Closed
ivanovaleksey opened this issue Jul 11, 2017 · 1 comment
Closed

Find returns false #25

ivanovaleksey opened this issue Jul 11, 2017 · 1 comment

Comments

@ivanovaleksey
Copy link
Contributor

Hi @palkan,

Today I have faced with an issue:

Amorail::Lead.find ANY_NONEXISTENT_ID
=> false

I don't it is convenient to return false from #find because one waits for lead instance (if given lead is exists) or nil.

It seems like it occurs because of Entity#handle_response returns false.

My proposal is to return nil instead of false.

What do you think?

@palkan
Copy link
Contributor

palkan commented Jul 11, 2017

Yep, nil is better. Feel free to submit a PR.

ivanovaleksey added a commit to ivanovaleksey/amorail that referenced this issue Jul 11, 2017
@palkan palkan closed this as completed in 624bf8d Jul 12, 2017
ivanovaleksey added a commit to ivanovaleksey/amorail that referenced this issue Jul 18, 2017
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