Skip to content

Commit 2590fc1

Browse files
authoredOct 4, 2023
Upgrade to Python 3.8 and Node 14 (#420)
* Ignore milliseconds in check_time_overlap Get rid of occasional "ValueError: unconverted data remains: .194818" * Upgrade to Python 3.8 and dependencies * Update and remove more Python libraries * Upgrade to Node 14
1 parent 1be9911 commit 2590fc1

File tree

5 files changed

+3649
-3346
lines changed

5 files changed

+3649
-3346
lines changed
 

‎Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 0 - Node build
2-
FROM node:8
2+
FROM node:14
33
WORKDIR /meow
44
ADD package.json package-lock.json /meow/
55
RUN npm install
@@ -10,7 +10,7 @@ RUN npm run build-production
1010
# Slightly modified from
1111
# https://www.caktusgroup.com/blog/2017/03/14/production-ready-dockerfile-your-python-django-app/
1212
#FROM python:3.6-alpine
13-
FROM python:3.6
13+
FROM python:3.8
1414
ENV PYTHONDONTWRITEBYTECODE 1
1515
ENV PYTHONUNBUFFERED 1
1616

‎meow/scheduler/views.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ def check_time_overlap(request):
262262

263263
if 'pub_date' in request.data and 'pub_time' in request.data and 'selectedSection' in request.data:
264264
year, month, day = str(request.data['pub_date']).split('-')
265-
new_pub_time = datetime.datetime.strptime(request.data['pub_time'],'%H:%M:%S')
265+
request_pub_time = request.data['pub_time'].split('.')[0] # ignore milliseconds if present in string
266+
new_pub_time = datetime.datetime.strptime(request_pub_time,'%H:%M:%S')
266267
meow_time_range = datetime.timedelta(minutes=15)
267268

268269
posts = SMPost.objects.filter(pub_date=datetime.date(int(year), int(month), int(day))) \

0 commit comments

Comments
 (0)
Please sign in to comment.