1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-04 22:40:30 +00:00

Do not join again after query_modifier joins

This commit is contained in:
Mo 2022-08-18 18:58:30 +02:00
parent 7f3797719d
commit 900049d410

View file

@ -1061,11 +1061,8 @@ class AppointmentView(SecureAdminModelView):
def apply(self, query, value, alias=None):
experimentNumber, programId = ExperimentRowFilter.get_values(value)
return (
query.join(GroupExperiment)
.join(SemesterExperiment)
.join(Experiment)
.where(Experiment.program_id == programId, Experiment.number == experimentNumber)
return query.join(Experiment).where(
Experiment.program_id == programId, Experiment.number == experimentNumber
)
class AssistantFilter(AssistantRowFilter):
@ -1158,11 +1155,8 @@ class ExperimentMarkView(SecureAdminModelView):
def apply(self, query, value, alias=None):
experimentNumber, programId = ExperimentRowFilter.get_values(value)
return (
query.join(GroupExperiment)
.join(SemesterExperiment)
.join(Experiment)
.where(Experiment.program_id == programId, Experiment.number == experimentNumber)
return query.join(Experiment).where(
Experiment.program_id == programId, Experiment.number == experimentNumber
)
class ProgramFilter(ProgramRowFilter):