correctly recognize new userhandle of mobileclient
This commit is contained in:
parent
37cd31ec6b
commit
ecafc07431
1 changed files with 3 additions and 3 deletions
|
@ -15,13 +15,13 @@ class MobileclientMiddleware:
|
|||
return False
|
||||
|
||||
user_agent = user_agent[12:].split('/')
|
||||
if len(user_agent) != 2:
|
||||
if len(user_agent) < 2:
|
||||
return False
|
||||
|
||||
app_platform, app_version = user_agent
|
||||
app_platform, app_version = user_agent[0:2]
|
||||
if app_platform == 'Android':
|
||||
# activate new mobileclient features for the c3nav android app 4.0.0 or higher
|
||||
# yep, iphone app can do this stuff yet
|
||||
# yep, iphone app can't do this stuff yet
|
||||
if not app_version.isdigit():
|
||||
return False
|
||||
app_version = int(app_version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue