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

Comments

Projects
None yet
2 participants
@ivanovaleksey
Collaborator

ivanovaleksey commented Jul 11, 2017

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

This comment has been minimized.

Member

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 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