Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early November update #924

Merged
merged 79 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
6aeef42
Feat(kontres)/add image to bookable item (#785)
eriskjel Mar 23, 2024
c9b5975
Feat(kontres)/add approved by (#786)
eriskjel Apr 6, 2024
28067fa
Create minutes for Codex (#787)
MadsNyl Apr 8, 2024
9e4ff76
Feat(minute)/viewset (#788)
MadsNyl Apr 8, 2024
0544b2f
Feat(kontres)/add notification (#790)
eriskjel Apr 10, 2024
ae483dd
Memberships with fines activated (#791)
MadsNyl Apr 12, 2024
95ef58c
fixed merge
MadsNyl Apr 13, 2024
bfa2299
Feat(user)/user bio (#758)
haruixu Apr 16, 2024
3f56496
Update CHANGELOG.md
MadsNyl Apr 16, 2024
064da8a
added filter for allowed photos for user (#794)
MadsNyl Apr 17, 2024
81a3c5e
Upped payment time when coming from waiting list (#796)
MadsNyl Apr 17, 2024
a583c45
fixed paymenttime saved to db (#798)
MadsNyl Apr 17, 2024
0f24085
fixed bug (#800)
MadsNyl Apr 17, 2024
8a3cfd4
fixed mergeconflict
MadsNyl Apr 17, 2024
e597268
Disallow users to unregister when payment is done (#802)
MadsNyl May 1, 2024
3b84765
update changelog
MadsNyl May 1, 2024
f21e0ab
Added serializer for category in event (#804)
MadsNyl May 2, 2024
e30f102
fixed merge
MadsNyl May 2, 2024
64d717c
Permission middelware (#806)
MadsNyl Jun 9, 2024
ed57afc
Permission refactor of QR Codes (#807)
MadsNyl Jun 9, 2024
ab3cf15
Permissions for payment orders (#808)
MadsNyl Jun 10, 2024
062193d
chore(iac): updated docs and force https (#810)
martcl Jul 26, 2024
23b310a
feat(iac): add terraform guardrails so index don't nuke our infra (#811)
martcl Jul 26, 2024
fa31096
Automatic registration for new users with Feide (#809)
MadsNyl Jul 30, 2024
bef294d
changelog update
MadsNyl Jul 30, 2024
4db63b5
Merge branch 'dev' of https://github.com/TIHLDE/Lepton into dev
MadsNyl Jul 30, 2024
fcce5e8
Feide env variables Terraform (#814)
MadsNyl Jul 31, 2024
514a26b
added delete endpoint for file (#815)
MadsNyl Aug 4, 2024
d3e8e9a
Update CHANGELOG.md
MadsNyl Aug 4, 2024
a02af01
merge conflict
MadsNyl Aug 4, 2024
c9bf357
format
MadsNyl Aug 4, 2024
1a7dff4
format
MadsNyl Aug 4, 2024
f086ac2
fixed permission for committee leaders for group forms
MadsNyl Aug 18, 2024
ec03558
updated csv for forms (#818)
MadsNyl Aug 18, 2024
0526f02
Permission for group forms and news (#820)
MadsNyl Aug 21, 2024
39f7cd0
merge and changelog
MadsNyl Aug 21, 2024
f40fba0
Update reservation_seralizer.py (#822)
MindChirp Aug 27, 2024
1f03c30
Group ownership of Minutes (#847)
MadsNyl Sep 14, 2024
d7e9b91
Changed endpoint response (#846)
MindChirp Sep 14, 2024
b574fdc
updated changelog.md
MadsNyl Sep 14, 2024
8b83718
Merge branch 'dev' of https://github.com/TIHLDE/Lepton into dev
MadsNyl Sep 14, 2024
bf42e7a
merge
MadsNyl Sep 14, 2024
99ba049
finished events now appear in the correct order (newest first) (#849)
EmilJohns1 Sep 17, 2024
a17c46d
Implement Swagger (#858)
MadsNyl Sep 20, 2024
496d536
Swagger GitHub Action (#860)
MadsNyl Sep 21, 2024
0c1de71
Add new app (#862)
MadsNyl Sep 23, 2024
9a19163
Upgrade all dependencies to latest (#857)
Tmpecho Sep 23, 2024
f991cec
Allow HS members to create a new group (#864)
Tmpecho Sep 23, 2024
1166728
App Script Fix (#875)
MadsNyl Sep 24, 2024
0771f2d
Event registration payment orders (#876)
MadsNyl Sep 24, 2024
5b06e4e
chore(deps): update python-dotenv requirement from ~=0.21.1 to ~=1.0.…
dependabot[bot] Sep 24, 2024
01fdcc3
Chore(deps): Bump sentry-sdk from 1.14.0 to 2.8.0 (#866)
dependabot[bot] Sep 24, 2024
192e7ee
Codex Course (#852)
MadsNyl Sep 24, 2024
26fb8d1
merge conflict and update CHANGELOG.md
MadsNyl Sep 25, 2024
7d5c0f1
fixed filtering of groups and made tests
MadsNyl Sep 25, 2024
20aabb4
merge conflict
MadsNyl Sep 25, 2024
edb007f
fixed list endpoint for cheatsheets
MadsNyl Sep 25, 2024
9236863
trigger
MadsNyl Sep 25, 2024
3b9004e
format
MadsNyl Sep 25, 2024
527d0c2
Endpoint for sending email (#883)
EmilJohns1 Sep 26, 2024
d0a0c07
chore(deps): bump black from 24.3.0 to 24.8.0 (#869)
dependabot[bot] Sep 27, 2024
81f7c7e
chore(deps): Bump azure-storage-blob from 12.13.1 to 12.23.1 (#885)
dependabot[bot] Sep 30, 2024
019d273
Added admin.py to root in new app, and added app dir to tests (#892)
MadsNyl Oct 1, 2024
14edd06
Description to forms (#894)
MadsNyl Oct 1, 2024
1a49b08
Bug report system (#865)
josefinearntsen Oct 11, 2024
1393885
Renaming of index app to feedback (#901)
MadsNyl Oct 11, 2024
c44e910
chore(deps): bump django from 4.2.16 to 5.1.1 (#889)
dependabot[bot] Oct 11, 2024
17b2483
Event registration race condition (#902)
MadsNyl Oct 11, 2024
119bbdb
upadted CHANGELOG.md
MadsNyl Oct 11, 2024
0e053d4
Feat(registration)/filter participants (#895)
yazanzarka1 Oct 28, 2024
07a2ab5
Feat(registration)/filter participants (#915)
yazanzarka1 Oct 28, 2024
ef656d3
Fix issue where full error is exposed to external users (#914)
Tmpecho Oct 28, 2024
02bb209
chore(deps): Bump sentry-sdk from 2.8.0 to 2.14.0 (#893)
dependabot[bot] Oct 28, 2024
e690181
Refactor/minor code cleanup (#884)
Tmpecho Oct 28, 2024
2bff09a
Add default detail to custom exceptions (#916)
Tmpecho Oct 28, 2024
ca5eb3a
chore(deps): bump uvicorn from 0.30.6 to 0.32.0 (#908)
dependabot[bot] Oct 29, 2024
95965cb
chore(deps): Bump pre-commit from 3.8.0 to 4.0.1 (#899)
dependabot[bot] Oct 29, 2024
b5670f0
Feat(registration)/filter participants (#917)
yazanzarka1 Oct 29, 2024
a2185c6
merge
MadsNyl Nov 4, 2024
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

## Neste versjon

## Versjon 2024.11.04
- 🎨**Overordnet**. Endret variabel og funksjonsnavn til å følge konvensjoner og andre små endringer.
- ✨ **Filtrering**. Admin kan nå filtere deltakere av et arrangement på studie, studieår, om deltakere har allergier, (om deltakere godtar å bli tatt bilde av, om deltakere har ankommet), i tillegg til søk på fornavn og etternavn.

## Versjon 2024.10.11
- ✨ **Tilbakemelding-funksjon**. Man kan nå opprette tilbakemeldinger for bugs og idé.
- 🦟 **Påmelding**. Det vil nå ikke være mulig med flere påmeldinger på et arrangement enn maksgrensen.
Expand Down
1 change: 1 addition & 0 deletions app/authentication/serializers/change_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ChangePasswordSerializer(serializers.Serializer):
set_password_form_class = SetPasswordForm

def __init__(self, *args, **kwargs):
self.set_password_form = None
self.old_password_field_enabled = getattr(
settings, "OLD_PASSWORD_FIELD_ENABLED", True
)
Expand Down
5 changes: 5 additions & 0 deletions app/authentication/serializers/reset_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from django.contrib.auth.forms import PasswordResetForm
from rest_framework import serializers
from rest_framework.fields import empty

from sentry_sdk import capture_exception

Expand All @@ -16,6 +17,10 @@ class PasswordResetSerializer(serializers.Serializer):
email = serializers.EmailField()
password_reset_form_class = PasswordResetForm

def __init__(self, instance=None, data=empty, **kwargs):
super().__init__(instance, data, kwargs)
self.reset_form = None

def validate_email(self, value):
# Create PasswordResetForm with the serializer
try:
Expand Down
10 changes: 5 additions & 5 deletions app/badge/filters/badge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class UserWithBadgesFilter(FilterSet):
queryset=BadgeCategory.objects.all(),
)

def filter_category(self, queryset, name, value):
def filter_category(self, queryset, _name, value):
return queryset.filter(user_badges__badge__badge_category=value)

def filter_is_in_study(self, queryset, name, value):
def filter_is_in_study(self, queryset, _name, value):
return queryset.filter(
memberships__group__slug=value, memberships__group__type=GroupType.STUDY
)

def filter_is_in_studyyear(self, queryset, name, value):
def filter_is_in_studyyear(self, queryset, _name, value):
return queryset.filter(
memberships__group__slug=value, memberships__group__type=GroupType.STUDYYEAR
)
Expand All @@ -49,7 +49,7 @@ class UserWithSpecificBadgeFilter(FilterSet):
study = filters.NumberFilter(method="filter_study")
studyyear = filters.NumberFilter(method="filter_studyyear")

def filter_study(self, queryset, name, value):
def filter_study(self, queryset, _name, value):
return queryset.filter(
Exists(
Membership.objects.filter(
Expand All @@ -60,7 +60,7 @@ def filter_study(self, queryset, name, value):
)
)

def filter_studyyear(self, queryset, name, value):
def filter_studyyear(self, queryset, _name, value):
return queryset.filter(
Exists(
Membership.objects.filter(
Expand Down
4 changes: 2 additions & 2 deletions app/career/filters/job_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class Meta:
model: JobPost
fields = ["expired", "job_type"]

def filter_expired(self, queryset, name, value):
def filter_expired(self, queryset, _name, value):
if value:
return queryset.filter(deadline__lt=yesterday()).order_by("-deadline")
return queryset.filter(deadline__gte=yesterday()).order_by("deadline")

def filter_classes(self, queryset, name, value):
def filter_classes(self, queryset, _name, value):
query = Q()
for year in value:
query |= Q(class_start__lte=year, class_end__gte=year)
Expand Down
13 changes: 7 additions & 6 deletions app/career/views/weekly_business.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


class WeeklyBusinessViewSet(BaseViewSet):

queryset = WeeklyBusiness.objects.none()
serializer_class = WeeklyBusinessSerializer
permission_classes = [BasicViewPermission]
Expand All @@ -30,7 +29,7 @@ def get_queryset(self):
in_future_this_year_filter = Q(year=now().year) & Q(week__gte=week_nr(now()))
next_year_filter = Q(year__gt=now().year)
return WeeklyBusiness.objects.filter(
(in_future_this_year_filter) | next_year_filter
in_future_this_year_filter | next_year_filter
).order_by("year", "week")

def list(self, request, *args, **kwargs):
Expand All @@ -57,9 +56,10 @@ def create(self, request, *args, **kwargs):
return Response(
{"detail": serializer.errors}, status=status.HTTP_400_BAD_REQUEST
)
except ValueError as value_error:
except ValueError:
return Response(
{"detail": str(value_error)}, status=status.HTTP_400_BAD_REQUEST
{"detail": "En feil oppstod under behandlingen av forespørselen."},
status=status.HTTP_400_BAD_REQUEST,
)

def update(self, request, pk):
Expand All @@ -78,9 +78,10 @@ def update(self, request, pk):
return Response(
{"detail": serializer.errors}, status=status.HTTP_400_BAD_REQUEST
)
except ValueError as value_error:
except ValueError:
return Response(
{"detail": str(value_error)}, status=status.HTTP_400_BAD_REQUEST
{"detail": "En feil oppstod under behandlingen av forespørselen."},
status=status.HTTP_400_BAD_REQUEST,
)

def destroy(self, request, *args, **kwargs):
Expand Down
8 changes: 6 additions & 2 deletions app/codex/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ class APICodexEventEndRegistrationDateBeforeStartRegistrationDate(APIException):


class CodexEventEndRegistrationDateAfterStartDate(ValueError):
pass
default_detail = (
"Sluttdatoen for påmelding kan ikke være etter startdatoen for kurset"
)


class CodexEventEndRegistrationDateBeforeStartRegistrationDate(ValueError):
pass
default_detail = (
"Sluttdatoen for påmelding kan ikke være før startdatoen for påmelding"
)
8 changes: 2 additions & 6 deletions app/codex/util/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

def validate_event_dates(data: dict):
if data["end_registration_at"] > data["start_date"]:
raise CodexEventEndRegistrationDateAfterStartDate(
"Påmeldingsslutt kan ikke være etter kursstart"
)
raise CodexEventEndRegistrationDateAfterStartDate()

if data["end_registration_at"] < data["start_registration_at"]:
raise CodexEventEndRegistrationDateBeforeStartRegistrationDate(
"Påmeldingsslutt kan ikke være før påmeldingsstart"
)
raise CodexEventEndRegistrationDateBeforeStartRegistrationDate()
22 changes: 11 additions & 11 deletions app/common/azure_file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, blob=None, url=None):
self.blob = blob
self.url = url
if url:
data = self.getContainerAndNameFromUrl()
data = self.get_container_and_name_from_url()
self.containerName = data[0]
self.blobName = data[1]

Expand All @@ -29,24 +29,24 @@ def get_or_create_container(self, name="default"):
container = blob_service_client.create_container(name, public_access="blob")
return container

def getContainerAndNameFromUrl(self):
def get_container_and_name_from_url(self):
import urllib.parse

url = urllib.parse.unquote(self.url)
# fmt: off
return re.sub("\w+:\/{2}[\d\w-]+(\.[\d\w-]+)*/", "", url).split("/") # noqa: W605
return re.sub("\w+:/{2}[\d\w-]+(\.[\d\w-]+)*/", "", url).split("/") # noqa: W605
# fmt: on

def uploadBlob(self):
"Uploads the given blob to Azure and returns a url to the blob"
def upload_blob(self):
"""Uploads the given blob to Azure and returns a url to the blob"""
if not self.blob:
raise ValueError("Du må sende med en blob for som skal lastes opp")

self.checkBlobSize()
containerName = self.getContainerNameFromBlob()
container = self.get_or_create_container(containerName)
self.check_blob_size()
container_name = self.get_container_name_from_blob()
container = self.get_or_create_container(container_name)

blob_name = f"{uuid.uuid4()}{self.getBlobName()}"
blob_name = f"{uuid.uuid4()}{self.get_blob_name()}"

content_settings = ContentSettings(
content_type=self.blob.content_type if self.blob.content_type else None,
Expand All @@ -62,8 +62,8 @@ def uploadBlob(self):
return blob_client.url
raise ValueError("Noe gikk galt under filopplastningen")

def deleteBlob(self):
"Delete a blob by it's url"
def delete_blob(self):
"""Delete a blob by it's url"""
if not self.blobName and not self.containerName:
raise ValueError("Du kan ikke slette en blob uten en url")

Expand Down
4 changes: 2 additions & 2 deletions app/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ class AdminGroup(models.TextChoices):

@classmethod
def all(cls):
return (cls.HS, cls.INDEX, cls.NOK, cls.PROMO, cls.SOSIALEN, cls.KOK)
return cls.HS, cls.INDEX, cls.NOK, cls.PROMO, cls.SOSIALEN, cls.KOK

@classmethod
def admin(cls):
return (cls.HS, cls.INDEX)
return cls.HS, cls.INDEX


class Groups(models.TextChoices):
Expand Down
10 changes: 5 additions & 5 deletions app/common/file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ def __init__(self, blob=None):
def get_or_create_container(self, name="default"):
pass

def getBlobName(self):
def get_blob_name(self):
return self.blob.name if self.blob.name else ""

def getContainerNameFromBlob(self):
def get_container_name_from_blob(self):
return (
"".join(e for e in self.blob.content_type if e.isalnum())
if self.blob.content_type
else "default"
)

def checkBlobSize(self):
def check_blob_size(self):
if self.blob.size > self.SIZE_50_MB:
raise ValueError("Filen kan ikke være større enn 50 MB")

@abstractmethod
def uploadBlob(self):
def upload_blob(self):
pass


Expand All @@ -43,6 +43,6 @@ def replace_file(instance_image, validated_data_image):
if instance_image and instance_image != validated_data_image:
if settings.AZURE_BLOB_STORAGE_NAME in instance_image:
try:
AzureFileHandler(url=instance_image).deleteBlob()
AzureFileHandler(url=instance_image).delete_blob()
except Exception as e:
capture_exception(e)
2 changes: 1 addition & 1 deletion app/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


@app.task(bind=True, base=BaseTask)
def delete_old_log_entries(self, *args, **kwargs):
def delete_old_log_entries(self, *_args, **_kwargs):
from datetime import timedelta

from django.contrib.admin.models import LogEntry
Expand Down
2 changes: 1 addition & 1 deletion app/common/tests/test_azure_filehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def test_get_getContainerAndNameFromUrl():
handler = AzureFileHandler(
url=f"https://{settings.AZURE_BLOB_STORAGE_NAME}/{container_name}/{file_name}"
)
data = handler.getContainerAndNameFromUrl()
data = handler.get_container_and_name_from_url()
assert data[0] == container_name
assert data[1] == file_name
12 changes: 6 additions & 6 deletions app/communication/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ class APIAnotherVisibleBannerException(APIException):
default_detail = "Det finnes allerede et banner som er synlig i samme tidsrom"


class AnotherVisibleBannerError(ValidationError):
default_detail = "Det finnes allerede et banner som er synlig i samme tidsrom"


class APIDatesMixedException(APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = "Datoen banneret er synlig til er satt etter datoen banneret for synlig fra. Bytt om disse to"


class AnotherVisibleBannerError(ValidationError):
pass


class DatesMixedError(ValidationError):
pass
default_detail = "Datoen banneret er synlig til er satt etter datoen banneret for synlig fra. Bytt om disse to"


class APIAllChannelsUnselected(APIException):
Expand All @@ -27,4 +27,4 @@ class APIAllChannelsUnselected(APIException):


class AllChannelsUnselected(ValueError):
pass
default_detail = "Du må velge minst en kommunikasjonsmetode"
2 changes: 1 addition & 1 deletion app/communication/factories/mail_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Meta:
body = factory.Faker("paragraph", nb_sentences=10)

@factory.post_generation
def users(self, create, extracted, **kwargs):
def users(self, create, extracted, **_kwargs):
"""Add users to the mail: `MailFactory.create(users=(user1, user2, user3))`"""
if not create or not extracted:
# Simple build, or nothing to add, do nothing.
Expand Down
2 changes: 1 addition & 1 deletion app/communication/models/banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ def is_visible(self):
return self.visible_from <= now() <= self.visible_until

@classmethod
def has_visible_permission(cls, request):
def has_visible_permission(cls, _request):
return True
5 changes: 3 additions & 2 deletions app/communication/models/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Meta:
def send(self, connection):
from app.communication.notifier import send_html_email

emails = (user.email for user in self.users.all())
emails = [user.email for user in self.users.all()]
is_success = send_html_email(
to_mails=emails,
html=self.body,
Expand All @@ -40,4 +40,5 @@ def send(self, connection):
return is_success

def __str__(self):
return f"\"{self.subject}\", to {self.users.all()[0] if self.users.count() == 1 else f'{self.users.count()} users'}, {'sent' if self.sent else 'eta'} {self.eta}"
return (f"\"{self.subject}\", to {self.users.all()[0] if self.users.count() == 1 else f'{self.users.count()} users'}, "
f"{'sent' if self.sent else 'eta'} {self.eta}")
2 changes: 1 addition & 1 deletion app/communication/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


@app.task(bind=True, base=BaseTask)
def send_due_mails(self, *args, **kwargs):
def send_due_mails(self, *_args, **_kwargs):
from django.core.mail import get_connection

from app.communication.models.mail import Mail
Expand Down
6 changes: 3 additions & 3 deletions app/communication/tests/test_banner_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
DatesMixedError,
)
from app.communication.factories.banner_factory import BannerFactory
from app.util.utils import getTimezone, now
from app.util.utils import get_timezone, now


@pytest.mark.parametrize(
Expand All @@ -27,8 +27,8 @@ def test_two_banners_can_not_be_visible_simultaneously_in_any_period(
This test uses timedelta and parameterize to switch visible_from
and visible_until between 5 days earlier or later."""
existing_banner = BannerFactory(
visible_from=datetime(2020, 1, 1, tzinfo=getTimezone()),
visible_until=datetime(2021, 1, 1, tzinfo=getTimezone()),
visible_from=datetime(2020, 1, 1, tzinfo=get_timezone()),
visible_until=datetime(2021, 1, 1, tzinfo=get_timezone()),
)

with pytest.raises(AnotherVisibleBannerError):
Expand Down
4 changes: 2 additions & 2 deletions app/communication/views/banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class Meta:
model = Banner
fields = ["is_visible", "is_expired"]

def filter_is_visible(self, queryset, name, value):
def filter_is_visible(self, queryset, _name, value):
if value:
return queryset.filter(visible_from__lte=now(), visible_until__gte=now())
return queryset

def filter_is_expired(self, queryset, name, value):
def filter_is_expired(self, queryset, _name, value):
if value:
return queryset.filter(visible_until__lt=now())
return queryset
Expand Down
2 changes: 1 addition & 1 deletion app/communication/views/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ def update(self, request, pk):
status=status.HTTP_200_OK,
)
return Response(
{"detail": ("Kunne ikke oppdatere varslet")},
{"detail": "Kunne ikke oppdatere varslet"},
status=status.HTTP_403_FORBIDDEN,
)
Loading
Loading