Fix cypress tests

This commit is contained in:
Daniel Egger 2022-10-04 11:49:12 +02:00
parent a8e7b6f433
commit fd6c15c282
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@
import colors from "@/colors.json";
import { useLearningPathStore } from "@/stores/learningPath";
import * as d3 from "d3";
import * as _ from "lodash";
import * as log from "loglevel";
export default {
@ -69,6 +70,7 @@ export default {
newCircle.title = circle.title;
newCircle.frontend_url = circle.frontend_url;
newCircle.id = circle.id;
newCircle.slug = _.kebabCase(circle.title);
internalCircles.push(newCircle);
});
return internalCircles;

View File

@ -1,4 +1,5 @@
import structlog
from django.views.decorators.cache import cache_page
from rest_framework.decorators import api_view
from rest_framework.response import Response
from wagtail.models import Page
@ -11,6 +12,7 @@ logger = structlog.get_logger(__name__)
@api_view(["GET"])
@cache_page(60 * 60 * 8, cache="api_page_cache")
def page_api_view(request, slug):
try:
page = Page.objects.get(slug=slug, locale__language_code="de-CH")