Skip to content
Merged

Sync #50

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix 'Request' object has no attribute 'tzinfo'
  • Loading branch information
zhangchunlin committed Mar 31, 2020
commit 92122ec195595c4c61a18d3b3f5299fd77bcc42d
2 changes: 1 addition & 1 deletion uliweb_apijson/apijson/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def _conver():
nonlocal v
if v and col.type.python_type==datetime:
_v = v
v = to_datetime(v,tzinfo=request.tzinfo)
v = to_datetime(v,tzinfo=request.tzinfo if (request and hasattr(request,"tzinfo")) else None)
if v==None:
raise UliwebError("'%s' cannot convert to datetime"%(_v))
if c1=='>':
Expand Down