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
use getattr to make code less
  • Loading branch information
zhangchunlin committed Mar 31, 2020
commit f3e308d19f093e86633233c0d5e31cbb20ac2943
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 if (request and hasattr(request,"tzinfo")) else None)
v = to_datetime(v,tzinfo=getattr(request,"tzinfo",None))
if v==None:
raise UliwebError("'%s' cannot convert to datetime"%(_v))
if c1=='>':
Expand Down