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

Manager.get_related_objects should handle an incorrect ref_cls gracefully #111

Open
technige opened this issue May 19, 2014 · 0 comments
Open

Comments

@technige
Copy link
Contributor

When the ref_cls argument passed to the Manager.get_related_objects function is neither Outgoing nor Incoming, the calling application fails with a LocalUnboundError which states that rel_query has not been defined.

Looking at the code at...

https://github.com/onefinestay/kaiso/blob/master/kaiso/persistence.py#L854

...it seems that inserting a simple else clause that raises a ValueError after line 859 could present a more meaningful error message in this case.

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

1 participant