Changes between Version 1 and Version 2 of Ticket #31691


Ignore:
Timestamp:
Jun 11, 2020, 11:17:41 AM (4 years ago)
Author:
john-parton
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31691 – Description

    v1 v2  
    3030
    3131{{{#!python
    32 class OrderableJSONBAgg(OrderableAggMixin, JSONBAgg)
    33     pass
     32class OrderableJSONBAgg(OrderableAggMixin, Aggregate):
     33    function = 'JSONB_AGG'
     34    template = '%(function)s(%(expressions)s %(ordering)s)'
     35    output_field = JSONField()
     36
     37    def convert_value(self, value, expression, connection):
     38        if not value:
     39            return []
     40        return value
    3441   
    3542   
Back to Top