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

Arm well's .get_current() should resemble .get() #74

Closed
crccheck opened this issue May 9, 2012 · 1 comment
Closed

Arm well's .get_current() should resemble .get() #74

crccheck opened this issue May 9, 2012 · 1 comment
Assignees
Milestone

Comments

@crccheck
Copy link
Member

crccheck commented May 9, 2012

So the issue I'm running into is: I want to use .get_current() but I only have the slug, not the title. What if .get_current, instead of expecting title, just took arbitrary kwargs it passed onto the .filter() inside? Code would change from well.objects.get_current('Test Well') to well.objects.get_current(title='TestWell'), and for comparison, well.objects.get(title='TestWell').

It's a backwards incompatible change, but could be written so it wasn't by grabbing args and kwargs and checking types or maybe just checking for the existence of args.

@niran
Copy link
Contributor

niran commented May 10, 2012

Agreed. Easy to make it backwards compatible.

@ghost ghost assigned tswicegood May 29, 2012
joncotton added a commit to joncotton/armstrong.core.arm_wells that referenced this issue Jun 29, 2012
…ug`.

In answer to armstrong/armstrong#74
The method takes kwargs for title or slug, but defaults to `title` if using an arg to maintain backward compatibility.
@crccheck crccheck closed this as completed Feb 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants