Skip to content

Commit 04b9123

Browse files
author
Dahye Kim
committed
Fixed bugs in AllocationChangeDeleteAttributeView
1 parent 765b75c commit 04b9123

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8
1+
FROM python:3.12
22

33
RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \
@@ -7,12 +7,15 @@ RUN apt-get update \
77
WORKDIR /usr/src/app
88
COPY requirements.txt ./
99
RUN pip3 install -r requirements.txt
10+
RUN pip3 install setuptools
11+
RUN pip3 install debugpy
1012
COPY . .
1113

12-
RUN python3 ./manage.py initial_setup
14+
RUN echo "yes" | python3 ./manage.py initial_setup
1315
RUN python3 ./manage.py load_test_data
1416

1517
ENV DEBUG=True
16-
18+
ENV DJANGO_DEBUG=True
19+
ENV PYTHONUNBUFFERED=1
1720
EXPOSE 8000
1821
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

coldfront/core/allocation/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ def get(self, request, pk):
18901890
reverse('allocation-change-detail', kwargs={'pk': allocation_change_pk}))
18911891

18921892
if user_schools:
1893-
if project_school.description not in [school.description for school in user_schools]: # Explicit comparison
1893+
if project_school.pk not in [school.pk for school in user_schools]:
18941894
messages.error(request, "You do not have permission to delete this allocation change request.")
18951895
return HttpResponseRedirect(
18961896
reverse('allocation-change-detail', kwargs={'pk': allocation_change_pk}))

0 commit comments

Comments
 (0)