gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
765 stars 138 forks source link

Update does not accept return_fields_by_field_id parameter #307

Closed NicoHood closed 9 months ago

NicoHood commented 1 year ago

Same issue as https://github.com/gtalarico/pyairtable/issues/194

This PR should have fixed it: https://github.com/gtalarico/pyairtable/pull/252

But the parameter is still missing: https://pyairtable.readthedocs.io/en/stable/_modules/pyairtable/api/table.html#Table.update

mesozoic commented 12 months ago

That's true! Unfortunately this is a limitation of the Airtable API; passing returnFieldsByFieldId to the update endpoint returns a 422 (unlike the batch update endpoint, which does the right thing).

In the branch you mentioned, there's a commented-out test showing how we could test it, if it were supported.

NicoHood commented 11 months ago

WTF? Alright, wouldnt it make sense to use the batch api then? I mean we could keep the same syntax and whenever airtable fixes this issue we could switch the call internally? That would make more sense, as we do not need to work around in the user code. Or is there any advantage in the "normal", single update call?

marks commented 11 months ago

Hi @NicoHood & @mesozoic - the Airtable PATCH/PUT endpoints for a single record now support returnFieldsByFieldId

NicoHood commented 11 months ago

Nice! So then we could just enable it, right?

mesozoic commented 11 months ago

I'll reopen the issue. Pull requests are welcome!

NicoHood commented 10 months ago

I am sorry I aint got time to work on this. I know the fix is easy, but I have other priorities. Would be nice if someone else could add this parameter :-)

marks commented 9 months ago

@NicoHood - I believe PR #320 takes care of this for you if you want to go over and subscribe for updates over there

mesozoic commented 9 months ago

Thanks for resolving this issue, @marks!