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