mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +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):
|
def apply(self, query, value, alias=None):
|
||||||
experimentNumber, programId = ExperimentRowFilter.get_values(value)
|
experimentNumber, programId = ExperimentRowFilter.get_values(value)
|
||||||
|
|
||||||
return (
|
return query.join(Experiment).where(
|
||||||
query.join(GroupExperiment)
|
Experiment.program_id == programId, Experiment.number == experimentNumber
|
||||||
.join(SemesterExperiment)
|
|
||||||
.join(Experiment)
|
|
||||||
.where(Experiment.program_id == programId, Experiment.number == experimentNumber)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
class AssistantFilter(AssistantRowFilter):
|
class AssistantFilter(AssistantRowFilter):
|
||||||
|
@ -1158,11 +1155,8 @@ class ExperimentMarkView(SecureAdminModelView):
|
||||||
def apply(self, query, value, alias=None):
|
def apply(self, query, value, alias=None):
|
||||||
experimentNumber, programId = ExperimentRowFilter.get_values(value)
|
experimentNumber, programId = ExperimentRowFilter.get_values(value)
|
||||||
|
|
||||||
return (
|
return query.join(Experiment).where(
|
||||||
query.join(GroupExperiment)
|
Experiment.program_id == programId, Experiment.number == experimentNumber
|
||||||
.join(SemesterExperiment)
|
|
||||||
.join(Experiment)
|
|
||||||
.where(Experiment.program_id == programId, Experiment.number == experimentNumber)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
class ProgramFilter(ProgramRowFilter):
|
class ProgramFilter(ProgramRowFilter):
|
||||||
|
|
Loading…
Reference in a new issue