From 428423c2cc410215703373b39df15eca81674f43 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Fri, 3 Mar 2023 23:47:30 +0800 Subject: [PATCH] Made content field for note unlimited --- project/accounts/serializers.py | 5 +++-- project/db.sqlite3 | Bin 151552 -> 241664 bytes .../migrations/0009_alter_note_content.py | 18 ++++++++++++++++++ project/notes/models.py | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 project/notes/migrations/0009_alter_note_content.py diff --git a/project/accounts/serializers.py b/project/accounts/serializers.py index 060f147..2d990c4 100644 --- a/project/accounts/serializers.py +++ b/project/accounts/serializers.py @@ -5,8 +5,9 @@ from notes.models import Note class CustomUserSerializer(serializers.ModelSerializer): notes = serializers.PrimaryKeyRelatedField( - many=True, queryset=Note.objects.all()) + many=True, allow_null=True, queryset=Note.objects.all()) class Meta: model = User - fields = ['id', 'username', 'notes'] + fields = ['id', 'username', 'notes',] + read_only_fields = ['id', 'notes'] diff --git a/project/db.sqlite3 b/project/db.sqlite3 index 68766b596ce1b3de26621d1d49aadde8e76d9eff..7180d3e705030a37cb3a444f6abffb63cc166660 100644 GIT binary patch literal 241664 zcmeI5eQXSfRU2|p0!+GJ0e4AaaOxs#pk}b=-);1e=hqz#al258atiX7UYxcqTx3tZbYKygWMeNR%{6_;yLwCNv*1W0mi zkvpJw0s4EM8FGd%k{F-XYuR5y91Z7rp5OeQ&-45J=6RVRZ{56Js2QQ9a%EMog%sCe zmms*_3WZ!Q*EYQ`()$d(`{{j)-X40_UqXFnm;c+YiS)@{${>i}XW4?{_x+~^zB};h zz`yi;!~5sHU+Vj6Z{G8>?mzDNi=H{*=Ul(Di>$7aw%$DI4c;9WwyK3v&Um1&*Ot@k zRil#5SIX;aRdc_PGe4$jC!s2ul$EmS^-|$pYxZMP^Qq)QDs+2x`sVFaXnOWi>P~2+ zHP;?OM?!P6?S)1{=SH|cWHn?VOnU7kvaH`*yX$Of8<=cv|Dm3Xq%8woP20tL>XLeKGltg-GBC?dt zEG0V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