cubicweb #1381429 wrong row count with aggregate functions [rejected]

Aggregate functions returns None if I have no resultset.

RSET

rset: <resultset Any MAX(ET) WHERE T eid %(track)s, X in_track T, X end_time ET,X in_state S, S name 'accepted' (1 rows)>
==> count: 1 / value: None

Log

querier input Any MAX(ET) WHERE T eid %(track)s, X in_track T, X end_time ET,X in_state S, S name 'accepted' {'track': 1059}
 rql for system source: Any MAX(ET) WHERE X in_track %(track)s, X end_time ET, X in_state S, S name "accepted"
   args {'track': 1059}
   cache key (u'Any MAX(ET) WHERE X in_track %(track)s, X end_time ET, X in_state S, S name "accepted"', 'Track')
   solutions [{'ET': 'Datetime', 'S': 'State', 'X': 'Talk'}]
exec SELECT MAX(_X.cw_end_time)
FROM cw_State AS _S, cw_Talk AS _X, in_state_relation AS rel_in_state1, in_track_relation AS rel_in_track0
WHERE rel_in_track0.eid_from=_X.cw_eid AND rel_in_track0.eid_to=%(track)s AND rel_in_state1.eid_from=_X.cw_eid AND rel_in_state1.eid_to=_S.cw_eid AND _S.cw_name=%(66378048)s {'track': 1059, '66378048': u'accepted'} <connection object at 0x35fb320; dsn: 'host=centaurus  dbname=jujconference  user=juj port=5432 password=xxx', closed: 0>
 --> [[None]]

I try to rewrite my RQL to:

RQL

Any ET GROUPBY X WHERE T eid %(track)s, X in_track T, X end_time ET,
X in_state S, S name 'accepted' HAVING MAX(ET)

... but without success.

prioritynormal
typebug
done in<not specified>
load0.000
load left0.000
closed by<not specified>