Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
condition: service_healthy
restart: true
postgres:
image: "postgres:17"
image: "docker.io/postgres:17"
networks:
- packet-network-dev
environment:
Expand Down
2 changes: 1 addition & 1 deletion packet/routes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def create_packet() -> Tuple[str, int]:
if not ldap.is_evals(ldap.get_member(username)):
return 'Forbidden: not Evaluations Director', 403

base_date: date = datetime.strptime(request.json['start_date'], '%m/%d/%Y').date()
base_date = datetime.strptime(request.json['start_date'], '%m/%d/%Y %H')

freshmen_in_post: Dict[str, POSTFreshman] = {
freshman.rit_username: freshman for freshman in map(POSTFreshman, request.json['freshmen'])
Expand Down
2 changes: 1 addition & 1 deletion packet/templates/include/admin/new_packets.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5 class="modal-title" id="new-packets-modal-label">New Packets</h5>
</div>
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" placeholder="Date Packets start (MM/DD/YYYY)" id="packet-start-date" required>
<input type="text" class="form-control" placeholder="Date Packets start (MM/DD/YYYY HH [EST])" id="packet-start-date" required>
<input type="file" class="form-control custom-file" id="newPacketsFile" required>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions packet/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
General utilities and decorators for supporting the Python logic
"""
from datetime import datetime, time, timedelta, date
from datetime import datetime, timedelta
from functools import wraps, lru_cache
from typing import Any, Callable, TypeVar, cast
from urllib.parse import urlparse
Expand Down Expand Up @@ -161,11 +161,9 @@ def sync_freshman(freshmen_list: dict) -> None:
db.session.commit()


def create_new_packets(base_date: date, freshmen_list: dict) -> None:
packet_start_time = time(hour=19)
packet_end_time = time(hour=21)
start = datetime.combine(base_date, packet_start_time)
end = datetime.combine(base_date, packet_end_time) + timedelta(days=14)
def create_new_packets(base_date: datetime, freshmen_list: dict) -> None:
start = base_date
end = base_date + timedelta(days=14)

app.logger.info('Fetching data from LDAP...')
all_upper = list(filter(
Expand Down
Loading