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:
parent
7f3797719d
commit
900049d410
1 changed files with 4 additions and 10 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue