Skip to content

Commit

Permalink
fix(release notes): hotfix 3.16.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hicham committed Nov 15, 2023
1 parent f62bacf commit 83c6ff9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion admin_cohort/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'Portail/Cohort360 API'
__version__ = '3.16.4'
__version__ = '3.16.5'
__author__ = 'Assistance Publique - Hopitaux de Paris, Département I&D'


Expand Down
4 changes: 1 addition & 3 deletions admin_cohort/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,4 @@ class ReleaseNoteSerializer(serializers.ModelSerializer):

class Meta:
model = ReleaseNote
exclude = ("insert_datetime",
"update_datetime",
"delete_datetime")
exclude = ("delete_datetime",)
6 changes: 5 additions & 1 deletion admin_cohort/views/release_notes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.db.models import QuerySet
from rest_framework import viewsets

from admin_cohort.models import ReleaseNote
Expand All @@ -8,7 +9,10 @@
class ReleaseNotesViewSet(viewsets.ModelViewSet):
queryset = ReleaseNote.objects.all()
serializer_class = ReleaseNoteSerializer
http_method_names = ["post", "get"]
http_method_names = ["post", "get", "patch"]
search_fields = ["title", "message"]
permission_classes = [IsAuthenticated]

def get_queryset(self) -> QuerySet:
return super(ReleaseNotesViewSet, self).get_queryset()\
.order_by("-insert_datetime")

0 comments on commit 83c6ff9

Please sign in to comment.