Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • aura/steering
  • kmohrf/steering
2 results
Show changes
......@@ -50,6 +50,6 @@ release_job:
release:
# TODO: automated release notes
name: 'Release $CI_COMMIT_TAG'
description: 'Created using the release-cli'
description: ./CHANGELOG
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_TAG'
......@@ -417,9 +417,9 @@ class APIScheduleViewSet(viewsets.ModelViewSet):
# First create submit -> return projected timeslots and collisions
# TODO: Perhaps directly insert into database if no conflicts found
if "solutions" not in request.data:
# TODO: respond with status.HTTP_409_CONFLICT when the dashboard can handle it
return Response(
Schedule.make_conflicts(request.data["schedule"], pk, show_pk),
status=status.HTTP_409_CONFLICT,
)
# Otherwise try to resolve
......@@ -430,7 +430,8 @@ class APIScheduleViewSet(viewsets.ModelViewSet):
return Response(resolution, status=status.HTTP_201_CREATED)
# Otherwise return conflicts
return Response(resolution, status=status.HTTP_409_CONFLICT)
# TODO: respond with status.HTTP_409_CONFLICT when the dashboard can handle it
return Response(resolution)
def update(self, request, *args, **kwargs):
"""
......@@ -471,9 +472,9 @@ class APIScheduleViewSet(viewsets.ModelViewSet):
# First update submit -> return projected timeslots and collisions
if "solutions" not in request.data:
# TODO: respond with status.HTTP_409_CONFLICT when the dashboard can handle it
return Response(
Schedule.make_conflicts(request.data["schedule"], pk, show_pk),
status=status.HTTP_409_CONFLICT,
Schedule.make_conflicts(request.data["schedule"], pk, show_pk)
)
# Otherwise try to resolve
......@@ -484,7 +485,8 @@ class APIScheduleViewSet(viewsets.ModelViewSet):
return Response(resolution)
# Otherwise return conflicts
return Response(resolution, status=status.HTTP_409_CONFLICT)
# TODO: respond with status.HTTP_409_CONFLICT when the dashboard can handle it
return Response(resolution)
def destroy(self, request, *args, **kwargs):
"""
......
......@@ -40,6 +40,8 @@ if [[ $docker == "false" ]]; then
if [[ $mode == "init-db" ]]; then
echo "apply database migrations"
./manage.py migrate
echo "collect static resources"
./manage.py collectstatic
echo "create django superuser"
./manage.py createsuperuser --noinput
echo "create rsa key"
......