gtalarico / pyairtable

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

orm.fields.SingleLinkField #354

Closed mesozoic closed 7 months ago

mesozoic commented 7 months ago

This branch introduces orm.fields.SingleLinkField, which wraps (but does not inherit from) LinkField. Implementers can use SingleLinkField to indicate that they only ever want the first linked record of a particular field (or None), to avoid having to deal with lists. It is configurable whether the field will silently ignore 2nd-Nth values in fields that happen to have multiple records linked, or if it will raise an exception in that circumstance.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (ae41931) to head (d6b0bfe). Report is 17 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #354 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 25 25 Lines 2315 2362 +47 ========================================= + Hits 2315 2362 +47 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.