Bug 709395 - consumer history with start/end date fails with Attribute error.
Summary: consumer history with start/end date fails with Attribute error.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 25
Assignee: James Slagle
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-05-31 15:32 UTC by Preethi Thomas
Modified: 2011-08-16 12:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:08:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-05-31 15:32:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@preethi ~]# rpm -q pulp
pulp-0.0.181-1.fc14.noarch

[root@preethi ~]# pulp-admin consumer history --id=preethi --start_date=2011-05-26
error: operation failed: AttributeError: 'str' object has no attribute 'tzinfo'

[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin consumer history --id=preethi --end_date=2011-05-27
error: operation failed: AttributeError: 'NoneType' object has no attribute 'tzinfo'

Comment 1 James Slagle 2011-06-13 20:04:43 UTC
There were 2 issues at play here.  Looks like there was a copy/paste issue when converting the end_date before making the query for history.  Second, there was a change to make the timestamps in the db to be in iso8601 date format, however the queries in the consumer_history api were still using epoch.  I fixed those issues and the tests.

There were a couple of commits, however the latest one is:
d963c42bc20ca4b434535d7ada773dc0f07a4597

Comment 2 Jeff Ortel 2011-06-17 21:10:12 UTC
build: 0.192

Comment 3 Preethi Thomas 2011-08-09 18:36:56 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.223-1.fc14.noarch


[root@preethi ~]# pulp-admin consumer history --id=preethi --start_date=2011-08-08
+------------------------------------------+
              Consumer History
+------------------------------------------+

Event Type            	Repo Unbound             
Timestamp             	2011-08-09 11:15:35-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Repo Bound               
Timestamp             	2011-08-09 09:20:14-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Consumer Created         
Timestamp             	2011-08-08 16:18:44-04:00
Originator            	admin                    

[root@preethi ~]# pulp-admin consumer history --id=preethi --end_date=2011-08-09 
+------------------------------------------+
              Consumer History
+------------------------------------------+

Event Type            	Repo Unbound             
Timestamp             	2011-08-09 11:15:35-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Repo Bound               
Timestamp             	2011-08-09 09:20:14-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Consumer Created         
Timestamp             	2011-08-08 16:18:44-04:00
Originator            	admin

Comment 4 Preethi Thomas 2011-08-16 12:08:24 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:21:27 UTC
Closing with Community Release 15

pulp-0.0.223-4.


Note You need to log in before you can comment on or make changes to this bug.