question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`is_multiple` vs custom fields

See original GitHub issue

Right now I don’t get multiple values in a custom field that does not inherit from the List field because is_multiple only checks for this.

And for some cases rewriting the field to be nested in an actual List field is not feasible, for example a SQLAlchemyModelList-like field where sending individual queries would be inefficient compared to one query with an SQL IN filter.

I propose adding a MultiValueField which would simply inherit from Field and do nothing itself, and instead of checking for isinstance List check for that one in is_multiple. List would then of course inherit from that instead of Field.

Alternatively, check for something like isinstance(field, List) or getattr(field, 'is_multiple', False).

I can send a PR if there’s interest in this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lafrechcommented, Apr 9, 2021

I did a few CHANGELOG updates. I don’t think it was worth a PR so I pushed to dev.

0reactions
lafrechcommented, Apr 13, 2021

Also we might want to add a paragraph in the upgrading section of the docs.

https://webargs.readthedocs.io/en/latest/upgrading.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom fields versus categories
Custom fields and categories can both be used to create search filters, they can both be used to create drill-down searches, they can...
Read more >
Network custom field settings
Custom field settings encompasses all of the information managed from Settings ... What type of field it is - multiple choice, number, checkbox,...
Read more >
Advanced field editing | Automation for Jira Data Center ...
Fields are case insensitive and you can replace spaces with underscores. If there are custom fields with the same name, or a custom...
Read more >
Filter/search in custom fields for Style or Items
Filter/search in custom fields for Style or Items Print ... If it is Multiple Allowed values - you can decide if you want...
Read more >
Feature - custom fields to accept multiple select
it would be good that drop downs on the custom fields could support multiple selects … a user setting would define if the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found