diff options
author | Nikolay Zamotaev <nzamotaev@luxoft.com> | 2020-01-28 17:12:38 +0300 |
---|---|---|
committer | Nikolay Zamotaev <nzamotaev@luxoft.com> | 2020-02-04 16:55:50 +0000 |
commit | 086fc8c681f63ecf099c8d167f050bf4177235ed (patch) | |
tree | 6306d1c4fadf9fecc39f95deb7cddfef0dbb09e4 | |
parent | a095cc3470c473f123c032f3fcfc599e006dad40 (diff) |
App Icon request now uses architecture parameter along with session parameters
Task-number: AUTOSUITE-1424
Change-Id: I76ddb3e5e42eeb280f978804ea28d200a838958e
Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
-rw-r--r-- | doc/src/deployment-server-reference.qdoc | 6 | ||||
-rw-r--r-- | store/api.py | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/src/deployment-server-reference.qdoc b/doc/src/deployment-server-reference.qdoc index b81bd7f..1ade88f 100644 --- a/doc/src/deployment-server-reference.qdoc +++ b/doc/src/deployment-server-reference.qdoc @@ -227,6 +227,12 @@ \row \li id \li The app ID. + \row + \li architecture + \li An optional parameter used to filter icons by architecture. Overrides architecture + specified in session. Receives the CPU architecture. If architecture was not specified + either in session or in this parameter, only icons showing \e{All} architecture + are listed. \endtable Returns a PNG image if the app exists; an HTTP 404 error otherwise. diff --git a/store/api.py b/store/api.py index 09b6550..04f6daf 100644 --- a/store/api.py +++ b/store/api.py @@ -235,9 +235,12 @@ def appDescription(request): def appIcon(request): archlist = ['All', ] - if 'architecture' in request.session: + dictionary = getRequestDictionary(request) + if 'architecture' in dictionary: + archlist.append(normalizeArch(dictionary['architecture'])) + elif 'architecture' in request.session: archlist.append(request.session['architecture']) - appId = getRequestDictionary(request)['id'] + appId = dictionary['id'] try: app = App.objects.filter(appid__exact = appId, architecture__in = archlist).order_by('architecture') app = app.last() |