Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit e65aa2d

Browse files
committed
applied code suggestion from @tsteinruecken
1 parent 065482c commit e65aa2d

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

render/json/default.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,7 @@ def preprocessParams(self, params):
237237
if not isinstance(params, dict):
238238
return params
239239

240-
res = params.copy()
241-
for key in ["category", "tooltip"]:
242-
if key in res.keys():
243-
res[key] = _(res[key])
244-
245-
return res
240+
return {key: (_(value) if key in ["category", "tooltip"] else value) for key, value in params.items()}
246241

247242
def view(self, skel, action="view", params = None, *args, **kwargs):
248243
return self.renderEntry(skel, action, params)

0 commit comments

Comments
 (0)