Changes between Version 2 and Version 3 of Ticket #36638, comment 2


Ignore:
Timestamp:
Oct 3, 2025, 11:16:41 AM (112 minutes ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36638, comment 2

    v2 v3  
    11> You can use `default=Value([])` if you prefer.
    22
    3 You don't have to do the `Value` wrapping, passing `default=[]` works just fine.
     3Small FYI that you don't have to do the `Value` wrapping for `ArrayField` expressions, passing `default=[]` works just fine.
    44
    5 `Value` wrapping is only necessary when passing a `str` literal as they default to field references (`'field'` is equivalent to `F('field')`) instead of value literals like any other Python literal does.
     5`Value` wrapping is only necessary when passing a `str` literal as they default to field references (`'field'` is equivalent to `F('field')`) instead of value literals like any other Python literal does. That's the reason why `Value` wrapping is necessary for `JSONBAgg` and `StringAgg` though.
Back to Top