Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92122ec

Browse files
committed
fix 'Request' object has no attribute 'tzinfo'
1 parentc584833 commit92122ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎uliweb_apijson/apijson/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def _conver():
300300
nonlocalv
301301
ifvandcol.type.python_type==datetime:
302302
_v=v
303-
v=to_datetime(v,tzinfo=request.tzinfo)
303+
v=to_datetime(v,tzinfo=request.tzinfoif (requestandhasattr(request,"tzinfo"))elseNone)
304304
ifv==None:
305305
raiseUliwebError("'%s' cannot convert to datetime"%(_v))
306306
ifc1=='>':

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp