mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +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 UserView(SecureAdminModelView):
|
||||||
class SemesterFilter(SemesterRowFilter):
|
class SemesterFilter(SemesterRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
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):
|
class CreateForm(Form):
|
||||||
def roleQueryFactory():
|
def roleQueryFactory():
|
||||||
|
@ -481,7 +481,7 @@ class PartRowFilter(FilterEqual):
|
||||||
class PartStudentView(SecureAdminModelView):
|
class PartStudentView(SecureAdminModelView):
|
||||||
class PartFilter(PartRowFilter):
|
class PartFilter(PartRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
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):
|
class StudentEndpointLinkRowAction(CustomIdEndpointLinkRowAction):
|
||||||
def customId(self, row):
|
def customId(self, row):
|
||||||
|
@ -583,7 +583,7 @@ class ProgramRowFilter(FilterEqual):
|
||||||
class GroupView(SecureAdminModelView):
|
class GroupView(SecureAdminModelView):
|
||||||
class ProgramFilter(ProgramRowFilter):
|
class ProgramFilter(ProgramRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
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):
|
def formFactory(is_created, group):
|
||||||
if is_created:
|
if is_created:
|
||||||
|
@ -645,7 +645,7 @@ class GroupView(SecureAdminModelView):
|
||||||
class ExperimentView(SecureAdminModelView):
|
class ExperimentView(SecureAdminModelView):
|
||||||
class ProgramFilter(ProgramRowFilter):
|
class ProgramFilter(ProgramRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
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
|
can_view_details = True
|
||||||
|
|
||||||
|
@ -1099,7 +1099,7 @@ class AppointmentView(SecureAdminModelView):
|
||||||
|
|
||||||
class AssistantFilter(AssistantRowFilter):
|
class AssistantFilter(AssistantRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
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):
|
class GroupExperimentEndpointLinkRowAction(CustomIdEndpointLinkRowAction):
|
||||||
def customId(self, row):
|
def customId(self, row):
|
||||||
|
@ -1204,7 +1204,7 @@ class ExperimentMarkView(SecureAdminModelView):
|
||||||
|
|
||||||
class AssistantFilter(AssistantRowFilter):
|
class AssistantFilter(AssistantRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
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):
|
class AdminFilter(FilterEqual):
|
||||||
def get_options(self, view):
|
def get_options(self, view):
|
||||||
|
@ -1215,7 +1215,7 @@ class ExperimentMarkView(SecureAdminModelView):
|
||||||
return tuple((admin.id, admin.repr()) for admin in admins)
|
return tuple((admin.id, admin.repr()) for admin in admins)
|
||||||
|
|
||||||
def apply(self, query, value, alias=None):
|
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):
|
class ExperimentFilter(ExperimentRowFilter):
|
||||||
def apply(self, query, value, alias=None):
|
def apply(self, query, value, alias=None):
|
||||||
|
|
Loading…
Reference in a new issue