cubicweb #343385 comparing entities with dates can raise an error [resolved]

cubicweb.entity.Entity inherits from dict which define __cmp__. CubicWeb 3.2.0 changed from mx.DateTime to datetime. Comparing two entities which have a yams.Date now raises a "TypeError: can't compare datetime.date to NoneType" if one of the two entities has an empty value for that attribute.

One way to fix this would be to implement __cmp__ on entities using the main attribute for ordering.

prioritynormal
typebug
done in3.4.5
load0.100
load left0.000
closed by<not specified>