What steps will reproduce the problem?
1. Add a document using a datetime value with a non-zero time field
for a stored solr.DateField field.
2. Retrieve the stored document from solr.
The time portion of the retrieved document should provide the time
passed in, but shows 00:00:00 instead.
The problem is caused by the order of the type checks in
SolrConnection.__add():
- Since datetime.datetime subclasses datetime.date, the first
isinstance(value, datetime.date) returns true, and throws
away the time value.
- The constructed incorrect value is then processed correctly.
The problem occurs in both the released 0.5 and the trunk.
The attached patch corrects the problem and adds a test.
Original issue reported on code.google.com by fdrake on 24 Jan 2010 at 8:41
Original issue reported on code.google.com by
fdrake
on 24 Jan 2010 at 8:41Attachments: