Project

General

Profile

Bug #2419

queryExemption API via REST can't specify TimeDelta for expires_within

Added by Randy Reitz almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Start date:
01/25/2012
Due date:
% Done:

0%

Estimated time:
Duration:

Description

For example:

http://tissue.fnal.gov/tissue/api/queryExemptions/?etype_code=ISSUE&expires_within=20d

yields:

{
"status": false,
"result": {
"argdict": "{u'expires_within': u'20d', u'etype_code': u'ISSUE'}",
"errcls": "exceptions.TypeError",
"errmsg": "unsupported operand type(s) for +: 'DateTime' and 'unicode'"
}
}

The line (456) in TissueQueryImpl.py:

if expires_within:
elist = elist.filter(expiration__lte=DateTime() + expires_within)

should check the type of expires_within and convert to a TimeDelta if it can.

History

#1 Updated by Lauri Carpenter almost 8 years ago

  • Status changed from New to Resolved

fixed

#2 Updated by Lauri Carpenter almost 8 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF