You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…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.
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 expectingtitle
, just took arbitrary kwargs it passed onto the .filter() inside? Code would change fromwell.objects.get_current('Test Well')
towell.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.
The text was updated successfully, but these errors were encountered: