Skip to content

Commit

Permalink
Merge pull request #6318 from mzimandl/fixes
Browse files Browse the repository at this point in the history
fix initial attr value for keywords
  • Loading branch information
tomachalek authored Oct 7, 2024
2 parents 3b9f874 + 5cff2d8 commit d759b56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/views/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async def form(amodel: KeywordsActionModel, req: KRequest, _: KResponse):
wlpat='.*',
score_type='din'))
await amodel.export_subcorpora_list(out)
amodel.export_form_args(out)

# initial reference corpus data
if amodel.curr_kwform_args.ref_corpname:
Expand Down Expand Up @@ -89,6 +88,10 @@ async def form(amodel: KeywordsActionModel, req: KRequest, _: KResponse):
'n': n,
'multisep': amodel.corp.get_conf(f'{n}.MULTISEP'),
} for n in cattrs]

if not amodel.curr_kwform_args.wlattr:
amodel.curr_kwform_args.wlattr = cattrs[0]
amodel.export_form_args(out)
return out


Expand Down

0 comments on commit d759b56

Please sign in to comment.