From e41eea8527d9596a2768411aba6459be28e1cd00 Mon Sep 17 00:00:00 2001 From: Emanuele Date: Fri, 5 Dec 2025 18:07:49 +0100 Subject: [PATCH] fix hb inline for admin --- cntmanage/flightslot/admins/weekpref_adm.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cntmanage/flightslot/admins/weekpref_adm.py b/cntmanage/flightslot/admins/weekpref_adm.py index ae5b221..38ca8ce 100644 --- a/cntmanage/flightslot/admins/weekpref_adm.py +++ b/cntmanage/flightslot/admins/weekpref_adm.py @@ -64,8 +64,13 @@ class WeekPreferenceAdmin(nested_admin.NestedPolymorphicModelAdmin): TrainingInLIne(self.model, self.admin_site), HourBuildingInLine(self.model, self.admin_site), ) - # All other courses have only training - return (TrainingInLIne(self.model, self.admin_site), ) + # All other courses have only training + return (TrainingInLIne(self.model, self.admin_site), ) + else: + return ( + TrainingInLIne(self.model, self.admin_site), + HourBuildingInLine(self.model, self.admin_site), + ) # If a user is registered as student do not show actions def get_actions(self, request: HttpRequest) -> Dict[str, Any]: