1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Removed default for program in ExperimentView

This commit is contained in:
Mo 2021-07-29 23:37:18 +02:00
parent 58d1ec73b5
commit 189998c7d3

View file

@ -359,6 +359,9 @@ class GroupView(SecureModelView):
class ExperimentView(SecureModelView): class ExperimentView(SecureModelView):
def programQueryFactory():
return Program.query
can_view_details = True can_view_details = True
column_filters = ["active"] column_filters = ["active"]
@ -380,6 +383,11 @@ class ExperimentView(SecureModelView):
form_columns = column_details_list form_columns = column_details_list
form_args = {"wiki_link": {"validators": [URL()]}} form_args = {"wiki_link": {"validators": [URL()]}}
form_extra_fields = {
"program": QuerySelectField(
"Program", query_factory=programQueryFactory, validators=[DataRequired()], allow_blank=True, blank_text="-"
)
}
def assistantQueryFactory(): def assistantQueryFactory():