1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00

Add link field to collection and fix the visited counter in collection page

This commit is contained in:
Sean Morley 2024-10-07 23:16:27 -04:00
parent 7d9bc16588
commit 1e61032692
8 changed files with 68 additions and 14 deletions

View file

@ -176,8 +176,7 @@ class CollectionSerializer(serializers.ModelSerializer):
class Meta:
model = Collection
# fields are all plus the adventures field
fields = ['id', 'description', 'user_id', 'name', 'is_public', 'adventures', 'created_at', 'start_date', 'end_date', 'transportations', 'notes', 'updated_at', 'checklists', 'is_archived', 'shared_with']
fields = ['id', 'description', 'user_id', 'name', 'is_public', 'adventures', 'created_at', 'start_date', 'end_date', 'transportations', 'notes', 'updated_at', 'checklists', 'is_archived', 'shared_with', 'link']
read_only_fields = ['id', 'created_at', 'updated_at', 'user_id']
def to_representation(self, instance):