Changeset View
Changeset View
Standalone View
Standalone View
swh/web/ui/utils.py
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | if 'children' in revision: | ||||
children = [] | children = [] | ||||
for child in revision['children']: | for child in revision['children']: | ||||
children.append(flask.url_for('api_revision_history', | children.append(flask.url_for('api_revision_history', | ||||
sha1_git_root=context, | sha1_git_root=context, | ||||
sha1_git=child)) | sha1_git=child)) | ||||
revision['children_urls'] = children | revision['children_urls'] = children | ||||
if 'message_decoding_failed' in revision: | |||||
revision['message_url'] = flask.url_for( | |||||
ardumont: Instead of the 3 tests before, can't we simplify to one test on 'message_decoding_failed'… | |||||
'api_revision_raw_message', | |||||
sha1_git=revision['id']) | |||||
return revision | return revision |
Instead of the 3 tests before, can't we simplify to one test on 'message_decoding_failed' existence?
I mean, isn't this sufficient?
?