diff --git a/cntmanage/docker/flightslot.Dockerfile b/cntmanage/docker/flightslot.Dockerfile index 651a3f9..a5c3a90 100644 --- a/cntmanage/docker/flightslot.Dockerfile +++ b/cntmanage/docker/flightslot.Dockerfile @@ -38,4 +38,4 @@ COPY ./docker/entrypoint.sh ./ ENTRYPOINT ["/app/entrypoint.sh"] # Command to be executed after entry point -CMD ["gunicorn", "cntmanage.wsgi:application", "--bind", "0.0.0.0:8000"] +CMD ["gunicorn", "cntmanage.wsgi:application", "--bind", "0.0.0.0:8000", "--timeout", "600"] diff --git a/cntmanage/flightslot/admins/student_adm.py b/cntmanage/flightslot/admins/student_adm.py index c4e942e..91bc269 100644 --- a/cntmanage/flightslot/admins/student_adm.py +++ b/cntmanage/flightslot/admins/student_adm.py @@ -41,9 +41,10 @@ class StudentResource(ModelResource): return super().before_import_row(row, **kwargs) # If course was addedd as a form kwasrg add it to the student after creation - def after_init_instance(self, instance: Student, new: bool, row: Dict[str, str], **kwargs: Dict[str, Any]): - if hasattr(kwargs, "course") and isinstance(kwargs["course"], Course): - instance.course = kwargs["course"] + def after_init_instance(self, instance: Student, new: bool, row: Dict[str, str], **kwargs: Dict[str, Any | Course]): + course = kwargs.get("course", None) + if course and isinstance(course, Course): + instance.course = course class Meta: model = Student