Commit 2f2d5a9e authored by Michal Čihař's avatar Michal Čihař

Simplify code

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent e62384db
......@@ -157,14 +157,11 @@ def search(translation, request):
# Remove old search results
cleanup_session(request.session)
if name is not None:
name = unicode(name)
# Store in cache and return
search_id = str(uuid.uuid1())
search_result = {
'query': search_query,
'name': name,
'name': unicode(name) if name else None,
'ids': unit_ids,
'search_id': search_id,
'ttl': int(time.time()) + 86400,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment