Skip to content

Commit

Permalink
DBC22-2330: fixed HTML tags being stripped in serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd committed Nov 29, 2024
1 parent 9f68f3e commit e536f37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/apps/feed/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def populate_event_task():
populate_all_event_data()


@db_periodic_task(crontab(hour="*/24", minute="0"))
@db_periodic_task(crontab(hour="*/24", minute="0", day_of_week="2"))
@lock_task('ferries-lock')
def populate_ferry_task():
populate_all_ferry_data()
Expand Down
7 changes: 7 additions & 0 deletions src/backend/apps/ferry/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
from rest_framework import serializers


class HTMLField(serializers.CharField):
def to_representation(self, value):
return value


class FerrySerializer(serializers.ModelSerializer):
class Meta:
model = Ferry
Expand All @@ -12,6 +17,8 @@ class Meta:


class FerryVesselSerializer(serializers.ModelSerializer):
schedule_detail = HTMLField()

class Meta:
model = Ferry
fields = (
Expand Down

0 comments on commit e536f37

Please sign in to comment.