mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Replace self.column
This commit is contained in:
parent
71835521bf
commit
ec70d966ac
1 changed files with 7 additions and 7 deletions
|
@ -85,7 +85,7 @@ class SemesterRowFilter(FilterEqual):
|
|||
class UserView(SecureAdminModelView):
|
||||
class SemesterFilter(SemesterRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.active_semester_id == int(value))
|
||||
return query.where(User.active_semester_id == int(value))
|
||||
|
||||
class CreateForm(Form):
|
||||
def roleQueryFactory():
|
||||
|
@ -481,7 +481,7 @@ class PartRowFilter(FilterEqual):
|
|||
class PartStudentView(SecureAdminModelView):
|
||||
class PartFilter(PartRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.part_id == int(value))
|
||||
return query.where(PartStudent.part_id == int(value))
|
||||
|
||||
class StudentEndpointLinkRowAction(CustomIdEndpointLinkRowAction):
|
||||
def customId(self, row):
|
||||
|
@ -583,7 +583,7 @@ class ProgramRowFilter(FilterEqual):
|
|||
class GroupView(SecureAdminModelView):
|
||||
class ProgramFilter(ProgramRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.program_id == int(value))
|
||||
return query.where(Group.program_id == int(value))
|
||||
|
||||
def formFactory(is_created, group):
|
||||
if is_created:
|
||||
|
@ -645,7 +645,7 @@ class GroupView(SecureAdminModelView):
|
|||
class ExperimentView(SecureAdminModelView):
|
||||
class ProgramFilter(ProgramRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.program_id == int(value))
|
||||
return query.where(Experiment.program_id == int(value))
|
||||
|
||||
can_view_details = True
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ class AppointmentView(SecureAdminModelView):
|
|||
|
||||
class AssistantFilter(AssistantRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.assistant_id == int(value))
|
||||
return query.where(Appointment.assistant_id == int(value))
|
||||
|
||||
class GroupExperimentEndpointLinkRowAction(CustomIdEndpointLinkRowAction):
|
||||
def customId(self, row):
|
||||
|
@ -1204,7 +1204,7 @@ class ExperimentMarkView(SecureAdminModelView):
|
|||
|
||||
class AssistantFilter(AssistantRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.assistant_id == int(value))
|
||||
return query.where(ExperimentMark.assistant_id == int(value))
|
||||
|
||||
class AdminFilter(FilterEqual):
|
||||
def get_options(self, view):
|
||||
|
@ -1215,7 +1215,7 @@ class ExperimentMarkView(SecureAdminModelView):
|
|||
return tuple((admin.id, admin.repr()) for admin in admins)
|
||||
|
||||
def apply(self, query, value, alias=None):
|
||||
return query.where(self.column.admin_id == int(value))
|
||||
return query.where(ExperimentMark.admin_id == int(value))
|
||||
|
||||
class ExperimentFilter(ExperimentRowFilter):
|
||||
def apply(self, query, value, alias=None):
|
||||
|
|
Loading…
Reference in a new issue