Skip to content

Commit ca38bb4

Browse files
committed
feat: make OWL AP default in UI
1 parent 5485494 commit ca38bb4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rdf_differ/entrypoints/ui/views.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ def view_dataset(dataset_id: str):
8585
application_profiles]
8686
form.template_type.choices = [(item, item) for item in
8787
application_profiles[0]['template_variations']]
88+
89+
preferred_ap = 'owl-core-en-only'
90+
91+
if not form.application_profile.data and form.application_profile.choices:
92+
matched = next(
93+
(value for value, _ in form.application_profile.choices if value == preferred_ap),
94+
None
95+
)
96+
form.application_profile.data = matched or form.application_profile.choices[0][0]
97+
8898
except Exception as e:
8999
logger.exception(str(e))
90100

0 commit comments

Comments
 (0)