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

feat: add primary image functionality to AdventureImage model and update related components

This commit is contained in:
Sean Morley 2025-01-02 23:25:58 -05:00
parent 991efa8d08
commit c6fa603a93
8 changed files with 112 additions and 5 deletions

View file

@ -8,7 +8,7 @@ from main.utils import CustomModelSerializer
class AdventureImageSerializer(CustomModelSerializer):
class Meta:
model = AdventureImage
fields = ['id', 'image', 'adventure']
fields = ['id', 'image', 'adventure', 'is_primary']
read_only_fields = ['id']
def to_representation(self, instance):