Closed miggland closed 1 year ago
@miggland you're right this looks strange. I think that probably params=params
should be removed from all instances?
Hmm.. the get
function for example doesn't do the translation to the params variable though.. it just forwards all kwargs.
Shouldn't eg line 183 be changed from
response = api.get(url=url, params=params, **kwargs)
to
response = api.get(url=url, params=params)
Also, the check if URL is in kwargs should be before kwargs
are assigned to params
, or is this required later on?
Maybe I should make a PR and test this out..
If you could confirm that I'm correct in my interpretation here:
Extra kwargs, which should not be sent: https://github.com/inventree/inventree-python/blob/d13d8af985fa9d5321ddd6f85c693ded2d6c5d2b/inventree/base.py#L161 since the kwargs are put in the params variable a few lines before: https://github.com/inventree/inventree-python/blob/d13d8af985fa9d5321ddd6f85c693ded2d6c5d2b/inventree/base.py#L156
Same thing here: https://github.com/inventree/inventree-python/blob/d13d8af985fa9d5321ddd6f85c693ded2d6c5d2b/inventree/base.py#L183 following on https://github.com/inventree/inventree-python/blob/d13d8af985fa9d5321ddd6f85c693ded2d6c5d2b/inventree/base.py#L175